Added Nginx Proxy Manager configuration
This commit is contained in:
parent
6e66ba22ce
commit
1d2b267127
2 changed files with 58 additions and 0 deletions
49
nginx/docker-compose.yml
Normal file
49
nginx/docker-compose.yml
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
services:
|
||||||
|
nginx:
|
||||||
|
image: 'jc21/nginx-proxy-manager:2.11.3'
|
||||||
|
container_name: nginx-proxy
|
||||||
|
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
|
||||||
|
environment:
|
||||||
|
TZ: "America/New_York"
|
||||||
|
# Mysql/Maria connection parameters:
|
||||||
|
DB_MYSQL_HOST: "db"
|
||||||
|
DB_MYSQL_PORT: 3306
|
||||||
|
DB_MYSQL_USER: "npm"
|
||||||
|
DB_MYSQL_PASSWORD_FILE: "/run/secrets/db_password"
|
||||||
|
DB_MYSQL_NAME: "npm"
|
||||||
|
volumes:
|
||||||
|
- ./data:/data
|
||||||
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
|
secrets:
|
||||||
|
- db_password
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
|
||||||
|
db:
|
||||||
|
image: 'jc21/mariadb-aria:10.11.5'
|
||||||
|
container_name: nginx-db
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
MYSQL_ROOT_PASSWORD_FILE: "/run/secrets/db_root_password"
|
||||||
|
MYSQL_DATABASE: "npm"
|
||||||
|
MYSQL_USER: "npm"
|
||||||
|
MYSQL_PASSWORD_FILE: "/run/secrets/db_password"
|
||||||
|
MARIADB_AUTO_UPGRADE: '1'
|
||||||
|
volumes:
|
||||||
|
- ./mysql:/var/lib/mysql
|
||||||
|
secrets:
|
||||||
|
- db_root_password
|
||||||
|
- db_password
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
db_password:
|
||||||
|
file: secrets/db_password.txt
|
||||||
|
db_root_password:
|
||||||
|
file: secrets/db_root_password.txt
|
||||||
9
setup.sh
9
setup.sh
|
|
@ -10,10 +10,19 @@ else
|
||||||
echo "Container command (Docker/Podman) could not be found!"
|
echo "Container command (Docker/Podman) could not be found!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -d "nginx" ]; then
|
||||||
|
cd nginx
|
||||||
|
echo "Attempting to start nginx container ..."
|
||||||
|
$PROG compose -f docker-compose.yml up -d
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
|
||||||
# Check if folder exists
|
# Check if folder exists
|
||||||
if [ -d "forgejo" ]; then
|
if [ -d "forgejo" ]; then
|
||||||
cd forgejo
|
cd forgejo
|
||||||
echo "Attempting to start forgejo container ..."
|
echo "Attempting to start forgejo container ..."
|
||||||
$PROG compose -f docker-compose.yml up -d
|
$PROG compose -f docker-compose.yml up -d
|
||||||
|
cd ..
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Program finished successfully!"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue