fix: user / network issues

This commit is contained in:
AngeD 2023-09-17 20:55:13 +02:00
parent 72cd04329b
commit eb8398e226
7 changed files with 14 additions and 18 deletions

View File

@ -1,5 +1,2 @@
BASE_URL=chat. BASE_URL=chat.
EMAIL= EMAIL=
PUID=1000
PGID=1000

View File

@ -15,7 +15,6 @@ services:
element: element:
build: . build: .
restart: unless-stopped restart: unless-stopped
user: "$PUID:$PGID"
networks: networks:
- nginx - nginx

View File

@ -40,6 +40,7 @@ services:
- GITEA__database__PASSWD=$POSTGRES_PASSWORD - GITEA__database__PASSWD=$POSTGRES_PASSWORD
networks: networks:
- nginx - nginx
- default
depends_on: depends_on:
- db - db

View File

@ -14,14 +14,14 @@ server {
ssl_certificate /etc/letsencrypt/live/$BASE_URL/fullchain.pem; ssl_certificate /etc/letsencrypt/live/$BASE_URL/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/$BASE_URL/privkey.pem; ssl_certificate_key /etc/letsencrypt/live/$BASE_URL/privkey.pem;
client_max_body_size 8G;
location / { location / {
proxy_pass http://gitea:3000; proxy_pass http://gitea:3000;
proxy_set_header Host $host; client_max_body_size 8G;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
} }
} }

View File

@ -44,6 +44,7 @@ services:
- OVERWRITEPROTOCOL=https - OVERWRITEPROTOCOL=https
networks: networks:
- nginx - nginx
- default
depends_on: depends_on:
- db - db
- redis - redis

View File

@ -14,16 +14,16 @@ server {
ssl_certificate /etc/letsencrypt/live/$BASE_URL/fullchain.pem; ssl_certificate /etc/letsencrypt/live/$BASE_URL/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/$BASE_URL/privkey.pem; ssl_certificate_key /etc/letsencrypt/live/$BASE_URL/privkey.pem;
client_max_body_size 1024G;
location / { location / {
proxy_pass http://nextcloud; proxy_pass http://nextcloud;
proxy_set_header Host $host; client_max_body_size 1024G;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $http_host; proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off; proxy_set_header X-Forwarded-Host $http_host;
proxy_redirect off;
} }
location /.well-known/carddav { location /.well-known/carddav {

View File

@ -9,9 +9,7 @@ certbot certonly -n \
-d "$BASE_URL" -d "$BASE_URL"
for f in *; do for f in *; do
envsubst "$(bash -c 'compgen -v' | xargs printf '$%s ')" \ envsubst "$(env | xargs printf '$%s ')" < "$f" > "/sites/$f"
< "$f" \
> "/sites/$f"
done done
printf "POST /containers/nginx/kill?signal=SIGHUP HTTP/1.0\r\n\n" \ printf "POST /containers/nginx/kill?signal=SIGHUP HTTP/1.0\r\n\n" \