понедельник, 15 января 2024 г.

Nginx Proxy Manager podman

storage="/rpool/containers"
newpodname="npm"
newpodlocalpath="$storage/$newpodname"
newpodmysqldb="npmdb"
newpodmysqluser="npmuser"
newpodmysqlpass="FdGawCetmok4"

podman pod create \
  --name $newpodname \
  -p 80:80 \
  -p 443:443 \
  -p 81:81

mkdir -p "$newpodlocalpath/data"
mkdir -p "$newpodlocalpath/letsencrypt"
podman run -d \
  --name=${newpodname}-npm \
  --pod=${newpodname} \
  -e DB_SQLITE_FILE=/data/database.sqlite \
  -e DISABLE_IPV6='true' \
  -v $newpodlocalpath/data:/data \
  -v $newpodlocalpath/letsencrypt:/etc/letsencrypt \
  docker.io/jc21/nginx-proxy-manager:latest

cd /etc/systemd/system
podman generate systemd --files --name ${newpodname}
systemctl daemon-reload
systemctl enable pod-${newpodname}
systemctl stop pod-${newpodname}
systemctl start pod-${newpodname}

version: '3.8'
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      # These ports are in format <host-port>:<container-port>
      - '80:80' # Public HTTP Port
      - '443:443' # Public HTTPS Port
      - '81:81' # Admin Web Port
      # Add any other Stream port you want to expose
      # - '21:21' # FTP

    # Uncomment the next line if you uncomment anything in the section
    # environment:
      # Uncomment this if you want to change the location of
      # the SQLite DB file within the container
      # DB_SQLITE_FILE: "/data/database.sqlite"

      # Uncomment this if IPv6 is not enabled on your host
      # DISABLE_IPV6: 'true'

    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt

Ратнер Арсений, arsenyratner@gmail.com, 7 985 273 2090

Комментариев нет:

Отправить комментарий