services: postgres: image: postgres:15-alpine container_name: quixotic-postgres restart: unless-stopped environment: POSTGRES_DB: quixotic POSTGRES_USER: quixotic POSTGRES_PASSWORD: quixotic123 volumes: - postgres-data:/var/lib/postgresql/data - ./database/init:/docker-entrypoint-initdb.d networks: - quixotic healthcheck: test: ["CMD-SHELL", "pg_isready -U quixotic"] interval: 5s timeout: 5s retries: 5 quixotic-app: build: context: . dockerfile: Dockerfile cache_from: - quixotic-app:latest image: quixotic-app:latest container_name: quixotic-app restart: unless-stopped environment: NODE_ENV: production PORT: 3000 DATABASE_URL: postgresql://quixotic:quixotic123@postgres:5432/quixotic DATABASE_SSL: false TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN:-} WEB_APP_URL: http://localhost:3000 volumes: - downloads:/app/downloads # Mount source code for hot reload (uncomment for development) # - ./src:/app/src # - ./public:/app/public ports: - "3000:3000" depends_on: postgres: condition: service_healthy networks: - quixotic volumes: downloads: postgres-data: networks: quixotic: driver: bridge