Initial commit
This commit is contained in:
43
play-life-backend/docker-compose.yml
Normal file
43
play-life-backend/docker-compose.yml
Normal file
@@ -0,0 +1,43 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:15-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: ${DB_USER:-playeng}
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD:-playeng}
|
||||
POSTGRES_DB: ${DB_NAME:-playeng}
|
||||
ports:
|
||||
- "${DB_PORT:-5432}:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-playeng}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
env_file:
|
||||
- ../.env
|
||||
- .env # Локальный .env имеет приоритет
|
||||
|
||||
backend:
|
||||
build: .
|
||||
ports:
|
||||
- "${PORT:-8080}:8080"
|
||||
environment:
|
||||
DB_HOST: db
|
||||
DB_PORT: 5432
|
||||
DB_USER: ${DB_USER:-playeng}
|
||||
DB_PASSWORD: ${DB_PASSWORD:-playeng}
|
||||
DB_NAME: ${DB_NAME:-playeng}
|
||||
PORT: ${PORT:-8080}
|
||||
TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN:-}
|
||||
TELEGRAM_CHAT_ID: ${TELEGRAM_CHAT_ID:-}
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- ./migrations:/migrations
|
||||
env_file:
|
||||
- ../.env
|
||||
- .env # Локальный .env имеет приоритет
|
||||
|
||||
Reference in New Issue
Block a user