This commit is contained in:
Andrey Kondratev
2025-11-07 21:12:49 +05:00
parent 5d7c6b2a09
commit ca27a2b3f0
3 changed files with 62 additions and 11 deletions

50
docker-compose.local.yml Normal file
View File

@@ -0,0 +1,50 @@
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
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
ports:
- "3000:3000"
depends_on:
postgres:
condition: service_healthy
networks:
- quixotic
volumes:
downloads:
postgres-data:
networks:
quixotic:
driver: bridge