2026-03-04 16:36:49 +01:00
|
|
|
name: sexy
|
2025-10-26 14:48:30 +01:00
|
|
|
services:
|
|
|
|
|
postgres:
|
|
|
|
|
image: postgres:16-alpine
|
2026-03-04 16:36:49 +01:00
|
|
|
container_name: sexy_postgres
|
2025-10-26 14:48:30 +01:00
|
|
|
restart: unless-stopped
|
2026-03-04 20:31:18 +01:00
|
|
|
ports:
|
|
|
|
|
- "5432:5432"
|
2025-10-26 14:48:30 +01:00
|
|
|
volumes:
|
2026-03-04 16:36:49 +01:00
|
|
|
- postgres_data:/var/lib/postgresql/data
|
2025-10-26 14:48:30 +01:00
|
|
|
environment:
|
2026-03-04 16:36:49 +01:00
|
|
|
POSTGRES_DB: sexy
|
|
|
|
|
POSTGRES_USER: sexy
|
|
|
|
|
POSTGRES_PASSWORD: sexy
|
2025-10-26 14:48:30 +01:00
|
|
|
healthcheck:
|
2026-03-04 16:36:49 +01:00
|
|
|
test: ["CMD-SHELL", "pg_isready -U sexy"]
|
2025-10-26 14:48:30 +01:00
|
|
|
interval: 10s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
|
|
|
|
redis:
|
|
|
|
|
image: redis:7-alpine
|
2026-03-04 16:36:49 +01:00
|
|
|
container_name: sexy_redis
|
2025-10-26 14:48:30 +01:00
|
|
|
restart: unless-stopped
|
2026-03-04 20:31:18 +01:00
|
|
|
ports:
|
|
|
|
|
- "6379:6379"
|
2025-10-26 14:48:30 +01:00
|
|
|
volumes:
|
2026-03-04 16:36:49 +01:00
|
|
|
- redis_data:/data
|
2025-10-26 14:48:30 +01:00
|
|
|
command: redis-server --appendonly yes
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
2026-03-04 18:07:18 +01:00
|
|
|
backend:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: Dockerfile.backend
|
|
|
|
|
container_name: sexy_backend
|
2025-10-26 14:48:30 +01:00
|
|
|
restart: unless-stopped
|
|
|
|
|
ports:
|
2026-03-04 18:07:18 +01:00
|
|
|
- "4000:4000"
|
2025-10-26 14:48:30 +01:00
|
|
|
volumes:
|
2026-03-04 18:07:18 +01:00
|
|
|
- uploads_data:/data/uploads
|
2025-10-26 14:48:30 +01:00
|
|
|
environment:
|
2026-03-04 18:07:18 +01:00
|
|
|
DATABASE_URL: postgresql://sexy:sexy@sexy_postgres:5432/sexy
|
|
|
|
|
REDIS_URL: redis://sexy_redis:6379
|
|
|
|
|
UPLOAD_DIR: /data/uploads
|
2026-03-04 16:36:49 +01:00
|
|
|
CORS_ORIGIN: http://localhost:3000
|
2026-03-04 18:07:18 +01:00
|
|
|
PORT: 4000
|
|
|
|
|
NODE_ENV: production
|
|
|
|
|
COOKIE_SECRET: change-me-in-production
|
|
|
|
|
SMTP_HOST: localhost
|
|
|
|
|
SMTP_PORT: 587
|
|
|
|
|
EMAIL_FROM: noreply@sexy.pivoine.art
|
|
|
|
|
PUBLIC_URL: http://localhost:3000
|
2025-10-26 14:48:30 +01:00
|
|
|
depends_on:
|
|
|
|
|
postgres:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
redis:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
healthcheck:
|
2026-03-04 18:07:18 +01:00
|
|
|
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:4000/health"]
|
2025-10-26 14:48:30 +01:00
|
|
|
interval: 30s
|
|
|
|
|
timeout: 10s
|
|
|
|
|
retries: 3
|
2026-03-04 18:07:18 +01:00
|
|
|
start_period: 20s
|
|
|
|
|
frontend:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
|
container_name: sexy_frontend
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
ports:
|
|
|
|
|
- "3000:3000"
|
|
|
|
|
environment:
|
|
|
|
|
NODE_ENV: production
|
|
|
|
|
PORT: 3000
|
|
|
|
|
HOST: 0.0.0.0
|
|
|
|
|
PUBLIC_API_URL: http://sexy_backend:4000
|
|
|
|
|
PUBLIC_URL: http://localhost:3000
|
|
|
|
|
depends_on:
|
|
|
|
|
backend:
|
|
|
|
|
condition: service_healthy
|
2025-10-26 14:48:30 +01:00
|
|
|
|
|
|
|
|
volumes:
|
2026-03-04 18:07:18 +01:00
|
|
|
uploads_data:
|
2025-10-26 14:48:30 +01:00
|
|
|
driver: local
|
2026-03-04 16:36:49 +01:00
|
|
|
postgres_data:
|
2025-10-26 14:48:30 +01:00
|
|
|
driver: local
|
2026-03-04 16:36:49 +01:00
|
|
|
redis_data:
|
2025-10-26 14:48:30 +01:00
|
|
|
driver: local
|