Files
waterfundbot/docker-compose.yml
2023-11-14 16:15:21 +03:00

31 lines
665 B
YAML

services:
postgres:
image: postgres:15.1
volumes:
- ./postgres_data:/var/lib/postgresql/data/:rw
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: db
healthcheck:
test: ["CMD-SHELL", "pg_isready -d db --user user"]
interval: 2s
timeout: 2s
retries: 5
bot:
build:
context: bot
environment:
DIALECT: postgresql
DRIVER: psycopg2
USER: user
PASSWORD: password
DB_NAME: db
HOST: postgres
PORT: 5432
volumes:
- ./.state-save:/app/.state-save/:rw
depends_on:
postgres:
condition: service_healthy