updated nginx container ports #7

Merged
Ghost merged 1 commits from dev into main 2025-02-07 21:47:31 +00:00
4 changed files with 27 additions and 16 deletions

View File

@ -31,8 +31,8 @@ services:
- ./certbot/conf:/etc/letsencrypt - ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot - ./certbot/www:/var/www/certbot
ports: ports:
- ${PORT}:${PORT} - ${NGINX_HTTP_PORT}:${MAIN_HTTP_PORT}
- ${PORT}:443 - ${NGINX_HTTPS_PORT}:443
certbot: certbot:
image: certbot/certbot:latest image: certbot/certbot:latest
@ -46,7 +46,7 @@ services:
dockerfile: Dockerfile.compose dockerfile: Dockerfile.compose
entrypoint: /compose-entrypoint.sh entrypoint: /compose-entrypoint.sh
ports: ports:
- '${PORT}:${PORT}' - '${MAIN_HTTP_PORT}:${MAIN_HTTP_PORT}'
depends_on: depends_on:
postgres: postgres:
condition: service_healthy condition: service_healthy
@ -55,7 +55,7 @@ services:
environment: environment:
- HOST=${HOST} - HOST=${HOST}
- PROTOCOL=${PROTOCOL} - PROTOCOL=${PROTOCOL}
- PORT=${PORT} - PORT=${MAIN_HTTP_PORT}
- APP_ENV=${APP_ENV} - APP_ENV=${APP_ENV}
- REDIS_HOST=${REDIS_HOST} - REDIS_HOST=${REDIS_HOST}
- POSTGRES_HOST=${POSTGRES_HOST} - POSTGRES_HOST=${POSTGRES_HOST}

View File

@ -8,12 +8,16 @@ events {
http { http {
server { server {
listen 7757;
listen [::]:7757; # nonstandard nginx http port
listen 7758;
listen [::]:7758;
server_name <HOSTNAME>; server_name <HOSTNAME>;
location / { location / {
proxy_pass http://<HOSTNAME>:7757;
# Forward to Automatisch site which is running on port 7757
proxy_pass http://main:7757;
} }
location ~ /.well-known/acme-challenge/ { location ~ /.well-known/acme-challenge/ {

View File

@ -8,12 +8,16 @@ events {
http { http {
server { server {
listen 7757;
listen [::]:7757; # nonstandard nginx http port
listen 7758;
listen [::]:7758;
server_name <HOSTNAME>; server_name <HOSTNAME>;
location / { location / {
proxy_pass http://<HOSTNAME>:7757;
# Forward to Automatisch site which is running on port 7757
proxy_pass http://main:7757;
} }
location ~ /.well-known/acme-challenge/ { location ~ /.well-known/acme-challenge/ {

View File

@ -9,9 +9,9 @@ http {
server { server {
listen 7757; # nonstandard nginx http port
listen [::]:7757; listen 7758;
listen [::]:7758;
server_name <HOSTNAME>; server_name <HOSTNAME>;
location ~ /.well-known/acme-challenge/ { location ~ /.well-known/acme-challenge/ {
@ -23,8 +23,9 @@ http {
server { server {
listen 7757 ssl http2; # nonstandard nginx https port
listen [::]:7757 ssl http2; listen 7759 ssl http2;
listen [::]:7759 ssl http2;
# use ssl letsencrypt certs # use ssl letsencrypt certs
ssl_certificate /etc/letsencrypt/live/<HOSTNAME>/fullchain.pem; ssl_certificate /etc/letsencrypt/live/<HOSTNAME>/fullchain.pem;
@ -33,7 +34,9 @@ http {
location / { location / {
proxy_pass http://<HOSTNAME>:7757/;
# Forward to Automatisch site which is running on port 7757
proxy_pass http://main:7757/;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;