pre-deploy commit
This commit is contained in:
@@ -6,19 +6,26 @@ services:
|
||||
container_name: telegram-tinder-bot
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- db
|
||||
db:
|
||||
condition: service_healthy
|
||||
env_file: .env
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DB_HOST={DB_HOST}
|
||||
- DB_PORT={DB_PORT}
|
||||
- DB_NAME={DB_NAME}
|
||||
- DB_USERNAME={DB_USERNAME}
|
||||
- DB_PASSWORD={DB_PASSWORD}
|
||||
- TELEGRAM_BOT_TOKEN={TELEGRAM_BOT_TOKEN}
|
||||
- DB_HOST=db
|
||||
- DB_PORT=5432
|
||||
- DB_NAME=telegram_tinder_bot
|
||||
- DB_USERNAME=postgres
|
||||
volumes:
|
||||
- ./uploads:/app/uploads
|
||||
- ./logs:/app/logs
|
||||
networks:
|
||||
- bot-network
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/health"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
db:
|
||||
image: postgres:15-alpine
|
||||
@@ -27,14 +34,18 @@ services:
|
||||
environment:
|
||||
- POSTGRES_DB=telegram_tinder_bot
|
||||
- POSTGRES_USER=postgres
|
||||
- POSTGRES_PASSWORD=password123
|
||||
- POSTGRES_PASSWORD=${DB_PASSWORD:-password123}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./src/database/migrations/init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
ports:
|
||||
- "5433:5432"
|
||||
networks:
|
||||
- bot-network
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
adminer:
|
||||
image: adminer:latest
|
||||
|
||||
Reference in New Issue
Block a user