forked from mtusi2026/mtusi2026lab2
feat(compose): add redis service
This commit is contained in:
@@ -13,6 +13,8 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
migrate:
|
migrate:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
@@ -45,6 +47,16 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
restart: "no"
|
restart: "no"
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis:8.8.3-alpine3.23
|
||||||
|
command: ["redis-server", "--save", "", "--appendonly", "no"]
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 3s
|
||||||
|
retries: 10
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
postgres_password:
|
postgres_password:
|
||||||
file: ./secrets/postgres_password.txt
|
file: ./secrets/postgres_password.txt
|
||||||
|
|||||||
Reference in New Issue
Block a user