43 lines
960 B
YAML
43 lines
960 B
YAML
version: "3.8"
|
|
|
|
services:
|
|
bot:
|
|
build:
|
|
context: .
|
|
dockerfile: dockerfile
|
|
container_name: pllist-bot
|
|
restart: always
|
|
environment:
|
|
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?sslmode=disable
|
|
- TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN}
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
networks:
|
|
- bot-net
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: pllist-postgres
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- bot-net
|
|
|
|
volumes:
|
|
postgres_data:
|
|
|
|
networks:
|
|
bot-net:
|
|
driver: bridge
|