From ada7f0b7e039e86b93da08d4073ccffc381b9c3a Mon Sep 17 00:00:00 2001 From: Marco Pedone Date: Fri, 10 Oct 2025 15:11:09 +0200 Subject: [PATCH] feat: update Docker configuration and add nginx setup for reverse proxy --- .dockerignore | 4 +++- apps/backend/Dockerfile | 2 +- apps/infoalloggi/emails/onboarding-servizio.tsx | 2 +- dev-tester.yml | 13 +++++++++++++ nginx.conf | 11 +++++++++++ 5 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 dev-tester.yml create mode 100644 nginx.conf diff --git a/.dockerignore b/.dockerignore index 00ad95e..bf11451 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,5 @@ .gitignore .git -.env \ No newline at end of file +.env +dev-tester.yml +nginx.conf \ No newline at end of file diff --git a/apps/backend/Dockerfile b/apps/backend/Dockerfile index 575f31e..7729cca 100644 --- a/apps/backend/Dockerfile +++ b/apps/backend/Dockerfile @@ -17,7 +17,7 @@ COPY . . RUN go build -o main . # Start a new stage from alpine:latest -FROM alpine:latest AS runner +FROM alpine:3.22 AS runner ARG POSTGRES_USER ARG POSTGRES_PASSWORD diff --git a/apps/infoalloggi/emails/onboarding-servizio.tsx b/apps/infoalloggi/emails/onboarding-servizio.tsx index 27662e1..f1fb6ad 100644 --- a/apps/infoalloggi/emails/onboarding-servizio.tsx +++ b/apps/infoalloggi/emails/onboarding-servizio.tsx @@ -68,7 +68,7 @@ const OnboardingServizio = ({ width="100%" /> - +
Codice: {annuncio.codice}
diff --git a/dev-tester.yml b/dev-tester.yml new file mode 100644 index 0000000..d8f0d38 --- /dev/null +++ b/dev-tester.yml @@ -0,0 +1,13 @@ +services: + reverse-proxy: + image: nginx:alpine + ports: + - "3000:3000" # Expose nginx on host port 3000 + volumes: + - ./nginx.conf:/etc/nginx/conf.d/default.conf # Mount config + networks: + - dokploy-network + +networks: + dokploy-network: + external: true \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..cd6cacc --- /dev/null +++ b/nginx.conf @@ -0,0 +1,11 @@ +server { + listen 3000; + + location / { + proxy_pass http://web:3000; + 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; + } +} \ No newline at end of file