diff --git a/monica/docker-compose.yml b/monica/docker-compose.yml index 8d81758..2556e8e 100644 --- a/monica/docker-compose.yml +++ b/monica/docker-compose.yml @@ -6,7 +6,7 @@ services: restart: 'always' healthcheck: - test: 'curl -f localhost:8080 || exit 1' + test: 'curl -f localhost:80 || exit 1' interval: '1m' timeout: '10s' retries: 3 diff --git a/nginx/sites-available/monica.conf.template b/nginx/sites-available/monica.conf.template new file mode 100644 index 0000000..05e5803 --- /dev/null +++ b/nginx/sites-available/monica.conf.template @@ -0,0 +1,25 @@ +server { + # SSL Key locations + ssl_certificate /etc/letsencrypt/live/${MONICA_DOMAIN}/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/${MONICA_DOMAIN}/privkey.pem; + + listen ${HTTPS_PORT} ssl; + listen [::]:${HTTPS_PORT} ssl; + server_name ${MONICA_DOMAIN}; + + client_max_body_size 1G; + + location / { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $server_name; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Ssl on; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + resolver 127.0.0.11; + proxy_pass http://${MONICA_HOST}:80; + } +}