36 lines
771 B
YAML
36 lines
771 B
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: tgvpn-db
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: tgvpn
|
|
POSTGRES_PASSWORD: tgvpn
|
|
POSTGRES_DB: tgvpn
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U tgvpn -d tgvpn"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
bot:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: tgvpn-bot:latest
|
|
container_name: tgvpn-bot
|
|
restart: unless-stopped
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
BOT_DEBUG: ${BOT_DEBUG:-false}
|
|
DATABASE_URL: postgres://tgvpn:tgvpn@db:5432/tgvpn?sslmode=disable
|
|
|
|
volumes:
|
|
pgdata:
|