generated from geekiot/python-template
Add [redis]: add redis image for docker-compose
This commit is contained in:
parent
2779098b1e
commit
7f3f601aa7
1 changed files with 15 additions and 0 deletions
|
|
@ -6,6 +6,9 @@ services:
|
|||
dockerfile: ./docker/Dockerfile
|
||||
command: sh -c "uv run --active --script ./scripts/pybabel.py compile && uv run ./src/main.py"
|
||||
restart: always
|
||||
depends_on:
|
||||
- database
|
||||
- redis
|
||||
|
||||
database:
|
||||
container_name: ${POSTGRES_HOST}
|
||||
|
|
@ -17,3 +20,15 @@ services:
|
|||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASS}
|
||||
POSTGRES_DB: ${POSTGRES_NAME}
|
||||
|
||||
redis:
|
||||
container_name: ${REDIS_HOST}
|
||||
image: redis:8.2.2
|
||||
command:
|
||||
- redis-server
|
||||
restart: always
|
||||
ports:
|
||||
- 127.0.0.1:${REDIS_PORT}:${REDIS_PORT}
|
||||
environment:
|
||||
REDIS_HOST: ${REDIS_HOST}
|
||||
REDIS_PORT: ${REDIS_PORT}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue