mirror of
https://github.com/LukeHagar/pypistats.dev.git
synced 2025-12-08 04:21:15 +00:00
Enhance docker-compose.yml by adding Redis password configuration and updating healthcheck command to use the password environment variable.
This commit is contained in:
@@ -17,10 +17,13 @@ services:
|
|||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:latest
|
image: redis:latest
|
||||||
|
environment:
|
||||||
|
SERVICE_PASSWORD_REDIS: ${SERVICE_PASSWORD_REDIS}
|
||||||
|
command: ["redis-server", "--requirepass", "${SERVICE_PASSWORD_REDIS}"]
|
||||||
ports:
|
ports:
|
||||||
- "6379:6379"
|
- "6379:6379"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "redis-cli", "ping"]
|
test: ["CMD-SHELL", "redis-cli -a $SERVICE_PASSWORD_REDIS ping"]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 20
|
retries: 20
|
||||||
@@ -38,6 +41,8 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
NODE_ENV: production
|
NODE_ENV: production
|
||||||
PORT: 3000
|
PORT: 3000
|
||||||
|
SERVICE_PASSWORD_POSTGRES: ${SERVICE_PASSWORD_POSTGRES}
|
||||||
|
SERVICE_PASSWORD_REDIS: ${SERVICE_PASSWORD_REDIS}
|
||||||
DATABASE_URL: postgresql://pypistats:${SERVICE_PASSWORD_POSTGRES}@db:5432/pypistats?schema=public
|
DATABASE_URL: postgresql://pypistats:${SERVICE_PASSWORD_POSTGRES}@db:5432/pypistats?schema=public
|
||||||
REDIS_URL: redis://:${SERVICE_PASSWORD_REDIS}@redis:6379
|
REDIS_URL: redis://:${SERVICE_PASSWORD_REDIS}@redis:6379
|
||||||
GOOGLE_PROJECT_ID: ${SERVICE_GOOGLE_PROJECT_ID}
|
GOOGLE_PROJECT_ID: ${SERVICE_GOOGLE_PROJECT_ID}
|
||||||
|
|||||||
Reference in New Issue
Block a user