29 lines
609 B
YAML
29 lines
609 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
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|