sqlalchemy is a good orm

This commit is contained in:
2023-06-06 17:55:46 +03:00
parent e37e3db701
commit 6962420e28
5 changed files with 75 additions and 29 deletions

View File

@ -1,4 +1,18 @@
services:
postgres:
image: postgres:15.1
restart: always
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
@ -11,12 +25,6 @@ services:
HOST: postgres
PORT: 5432
restart: always
postgres:
image: postgres:15.1
restart: always
volumes:
- ./postgres_data:/var/lib/postgresql/data/:Z
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: db
depends_on:
postgres:
condition: service_healthy