Nginx reverse proxy op poort 8081
All checks were successful
dev - build & deploy naar test / build-and-deploy (push) Successful in 21s
All checks were successful
dev - build & deploy naar test / build-and-deploy (push) Successful in 21s
This commit is contained in:
parent
01e7f77264
commit
3a77442abc
2 changed files with 27 additions and 0 deletions
|
|
@ -25,6 +25,17 @@ services:
|
||||||
- "127.0.0.1:${APP_PORT:-3000}:3000"
|
- "127.0.0.1:${APP_PORT:-3000}:3000"
|
||||||
restart: unless-stopped
|
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:
|
db:
|
||||||
image: postgres:17-alpine
|
image: postgres:17-alpine
|
||||||
environment:
|
environment:
|
||||||
|
|
|
||||||
16
deploy/nginx.conf
Normal file
16
deploy/nginx.conf
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue