From 647c8e576236d88233e03b34537daf3822ada6d4 Mon Sep 17 00:00:00 2001 From: Orion Kindel Date: Thu, 18 May 2023 22:03:54 -0500 Subject: [PATCH] fix: public/private port distinction is no longer necessary --- src/000-entry.sh | 4 ---- src/030-net.sh | 1 - src/gitea-docker-compose.yml | 2 +- src/nginx.conf | 3 ++- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/000-entry.sh b/src/000-entry.sh index faa57b0..2f304b5 100755 --- a/src/000-entry.sh +++ b/src/000-entry.sh @@ -7,10 +7,6 @@ subdomain_gitea="${SUBDOMAIN_GITEA:-git}" uid_git="${UID_GIT:-1000}" -# NOTE: hard-coded in ./gitea-docker-compose.yml, ./nginx.conf -port_gitea_public="${PORT_GITEA:-8880}" -port_gitea_internal="${PORT_GITEA:-8881}" - # Creates a login session for `user` (positional argument 1) in their home directory, # and executes a bash command string (positional argument 2) as `user`. # diff --git a/src/030-net.sh b/src/030-net.sh index 89ab99a..150cacb 100755 --- a/src/030-net.sh +++ b/src/030-net.sh @@ -5,5 +5,4 @@ ufw default allow outgoing ufw status verbose ufw allow ssh ufw allow 'Nginx Full' -ufw allow 8880/tcp ufw --force enable diff --git a/src/gitea-docker-compose.yml b/src/gitea-docker-compose.yml index 348d315..fa7de32 100644 --- a/src/gitea-docker-compose.yml +++ b/src/gitea-docker-compose.yml @@ -14,5 +14,5 @@ services: - /home/git/data/:/var/lib/gitea/data - /home/git/config/:/etc/gitea ports: - - "8881:3000" + - "8880:3000" # see also: ./nginx.conf - "127.0.0.1:2222:22" diff --git a/src/nginx.conf b/src/nginx.conf index 29ccf15..d2d17f3 100644 --- a/src/nginx.conf +++ b/src/nginx.conf @@ -4,7 +4,8 @@ server { location / { client_max_body_size 512M; - proxy_pass http://localhost:8881; + # see also: ./gitea-docker-compose.yml + proxy_pass http://localhost:8880; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;