38 lines
871 B
YAML
38 lines
871 B
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: tgvpn-db
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-tgvpn}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-tgvpn}
|
|
POSTGRES_DB: ${POSTGRES_DB:-tgvpn}
|
|
env_file:
|
|
- .env
|
|
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: ${DATABASE_URL:-postgres://tgvpn:tgvpn@db:5432/tgvpn?sslmode=disable}
|
|
|
|
volumes:
|
|
pgdata:
|