Nginx reverse proxy op poort 8081
All checks were successful
dev - build & deploy naar test / build-and-deploy (push) Successful in 21s

This commit is contained in:
bes-r 2026-07-08 22:17:28 +02:00
parent 01e7f77264
commit 3a77442abc
2 changed files with 27 additions and 0 deletions

View file

@ -25,6 +25,17 @@ services:
- "127.0.0.1:${APP_PORT:-3000}:3000"
restart: unless-stopped
web:
image: nginx:alpine
depends_on:
- app
ports:
# Bereikbaar in de browser op http://<vm-ip>:8081
- "8081:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
restart: unless-stopped
db:
image: postgres:17-alpine
environment:

16
deploy/nginx.conf Normal file
View file

@ -0,0 +1,16 @@
server {
listen 80;
server_name _;
# Wat groter zodat grote borden/afbeeldingen niet geweigerd worden
client_max_body_size 25m;
location / {
proxy_pass http://app:3000;
proxy_http_version 1.1;
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-Proto $scheme;
}
}