You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

70 lines
1.5 KiB

services:
# --- Database ---
postgres:
image: postgres:16-alpine
container_name: dropzone_postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
ports:
- "15432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./postgres/init:/docker-entrypoint-initdb.d:ro
networks:
- internal
# --- Go backend ---
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: dropzone_backend
restart: unless-stopped
environment:
DB_HOST: postgres
DB_PORT: 5432
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
JWT_SECRET: ${JWT_SECRET}
DISK_ROOT: ${DISK_ROOT}
NGINX_ACCEL: "true"
volumes:
- ${DISK_ROOT}:${DISK_ROOT}
depends_on:
- postgres
networks:
- internal
# --- Nginx: frontend + reverse proxy (SSL terminates na .66) ---
nginx:
build:
context: .
dockerfile: nginx/Dockerfile
container_name: dropzone_nginx
restart: unless-stopped
ports:
- "80:80"
environment:
DISK_ROOT: ${DISK_ROOT}
volumes:
- ./nginx/templates:/etc/nginx/templates:ro
- ${DISK_ROOT}:${DISK_ROOT}:ro
depends_on:
- backend
networks:
- internal
- external
volumes:
postgres_data:
networks:
internal:
driver: bridge
external:
driver: bridge