generated from geekiot/python-template
Add [database]: add the Postgres database to the Docker Compose config
This commit is contained in:
parent
cda8c9527f
commit
35eed1e193
1 changed files with 11 additions and 0 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue