Browse Source

Fix docker compose services startup

pull/1947/head
ileko 2 years ago
parent
commit
dfb39cd883
  1. 15
      docker/docker-compose.build.yml
  2. 15
      docker/docker-compose.yml

15
docker/docker-compose.build.yml

@ -11,16 +11,31 @@ services:
REDIS_PASSWORD: ${REDIS_PASSWORD}
ports:
- 3333:3333
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
postgres:
image: postgres:12
env_file:
- ../.env
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- postgres:/var/lib/postgresql/data
redis:
image: 'redis:alpine'
healthcheck:
test: ["CMD-SHELL","redis-cli ping | grep PONG"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres:

15
docker/docker-compose.yml

@ -11,16 +11,31 @@ services:
REDIS_PASSWORD: ${REDIS_PASSWORD}
ports:
- 3333:3333
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
postgres:
image: postgres:12
env_file:
- ../.env
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- postgres:/var/lib/postgresql/data
redis:
image: 'redis:alpine'
healthcheck:
test: ["CMD-SHELL","redis-cli ping | grep PONG"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres:

Loading…
Cancel
Save