Files
consume-rs/docker-compose.yml
2026-06-17 00:21:00 +02:00

62 lines
1.5 KiB
YAML

services:
db:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 10
# Dev-only SMTP catcher. UI at http://localhost:8025, SMTP on :1025.
# Point SMTP_HOST=mailpit SMTP_PORT=1025 SMTP_SECURITY=none to use it.
mailpit:
image: axllent/mailpit:latest
restart: unless-stopped
ports:
- "8025:8025"
- "1025:1025"
backend:
build: ./backend
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
BACKEND_HOST: 0.0.0.0
BACKEND_PORT: 8080
SESSION_SECRET: ${SESSION_SECRET}
PUBLIC_APP_URL: ${PUBLIC_APP_URL}
CORS_ORIGINS: ${CORS_ORIGINS}
SMTP_HOST: ${SMTP_HOST}
SMTP_PORT: ${SMTP_PORT}
SMTP_USERNAME: ${SMTP_USERNAME}
SMTP_PASSWORD: ${SMTP_PASSWORD}
SMTP_FROM: ${SMTP_FROM}
SMTP_SECURITY: ${SMTP_SECURITY}
ports:
- "8080:8080"
frontend:
build: ./frontend
restart: unless-stopped
depends_on:
- backend
environment:
PUBLIC_API_BASE: ${PUBLIC_API_BASE}
ports:
- "5173:3000"
volumes:
pgdata: