фиксы запуска
This commit is contained in:
@@ -1,21 +1,46 @@
|
||||
services:
|
||||
# backend:
|
||||
# build:
|
||||
# context: .
|
||||
# args:
|
||||
# GIT_COMMIT: ${GIT_COMMIT:-unknown}
|
||||
# env_file:
|
||||
# - .env
|
||||
# ports:
|
||||
# - "8000:8000"
|
||||
# depends_on:
|
||||
# - postgres
|
||||
|
||||
postgres:
|
||||
image: postgres
|
||||
image: postgres:15
|
||||
environment:
|
||||
POSTGRES_USER: "user"
|
||||
POSTGRES_PASSWORD: "password"
|
||||
POSTGRES_DB: "tgex"
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U user -d tgex"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: .
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
- DB__HOST=postgres
|
||||
- DB__PORT=5432
|
||||
- DB__USER=user
|
||||
- DB__PASSWORD=password
|
||||
- DB__DATABASE=tgex
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
env_file:
|
||||
- .env
|
||||
restart: unless-stopped
|
||||
|
||||
tg_bot:
|
||||
build:
|
||||
context: telegram_bot
|
||||
depends_on:
|
||||
- backend
|
||||
env_file:
|
||||
- .env
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
||||
Reference in New Issue
Block a user