feat: update Docker configuration and add nginx setup for reverse proxy

This commit is contained in:
Marco Pedone 2025-10-10 15:11:09 +02:00
parent b6d9842bcd
commit ada7f0b7e0
5 changed files with 29 additions and 3 deletions

View file

@ -1,3 +1,5 @@
.gitignore
.git
.env
.env
dev-tester.yml
nginx.conf

View file

@ -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

View file

@ -68,7 +68,7 @@ const OnboardingServizio = ({
width="100%"
/>
</Row>
<Row className="block w-full sm:hidden">
<Row className="block w-full ">
<div className="mb-[5px] flex h-[24px] w-fit items-center justify-center gap-1 rounded-full bg-indigo-600 px-2 text-[12px] leading-none font-semibold text-white">
<strong>Codice: </strong> {annuncio.codice}
</div>

13
dev-tester.yml Normal file
View file

@ -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

11
nginx.conf Normal file
View file

@ -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;
}
}