Skip to content

Commit

Permalink
fix(docker-compose): command format incorrect, postgres not fixed (#161)
Browse files Browse the repository at this point in the history
* fix(docker-compose): command format incorrect, postgres not fixed
* fix(docker-compose): support empty password
  • Loading branch information
nekomeowww committed Jul 15, 2023
1 parent b512e1e commit 3384018
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# # Redis username, default is `""`
# REDIS_USERNAME=
# # Redis password, default is `""`
# REDIS_PASSWORD=
# REDIS_PASSWORD=123456
# # Redis database, default is `0`
# REDIS_DB=0
# # Redis client cache enabled, default is `false`, read more about client cache at
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ services:
volumes:
- ./.postgres/data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $POSTGRES_DB -U $POSTGRES_USER" ]
test: [ "CMD-SHELL", "pg_isready -d $$POSTGRES_DB -U $$POSTGRES_USER" ]
interval: 10s
timeout: 5s
retries: 5
Expand All @@ -119,9 +119,9 @@ services:
environment:
- REDIS_PASSWORD=123456
command: >
${REDIS_PASSWORD:+--requirepass \"$REDIS_PASSWORD}\"}
/bin/sh -c "redis-server $${REDIS_PASSWORD:+--requirepass \"$$REDIS_PASSWORD\"}"
healthcheck:
test: [ "CMD-SHELL", "redis-cli -e ${REDIS_PASSWORD:+-a \"$REDIS_PASSWORD\"} --no-auth-warning ping" ]
test: [ "CMD-SHELL", "redis-cli -e $${REDIS_PASSWORD:+-a \"$$REDIS_PASSWORD\"} --no-auth-warning ping" ]
interval: 10s
timeout: 5s
retries: 5
Expand Down

0 comments on commit 3384018

Please sign in to comment.