Add [database]: add the Postgres database to the Docker Compose config

This commit is contained in:
Kirill Samoylenkov 2025-10-27 19:37:15 +05:00
parent cda8c9527f
commit 35eed1e193

View file

@ -6,3 +6,14 @@ services:
dockerfile: ./docker/Dockerfile
command: sh -c "uv run --active --script ./scripts/pybabel.py compile && uv run ./src/main.py"
restart: always
database:
container_name: ${POSTGRES_HOST}
image: postgres:15
ports:
- 127.0.0.1:${POSTGRES_PORT}:${POSTGRES_PORT}
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASS}
POSTGRES_DB: ${POSTGRES_NAME}