diff --git a/images/compose/compose.folders.yaml b/images/compose/compose.folders.yaml index 33b95808..591ab9b2 100644 --- a/images/compose/compose.folders.yaml +++ b/images/compose/compose.folders.yaml @@ -23,9 +23,10 @@ services: image: "pulp/pulp-web:latest" command: ['/usr/bin/nginx.sh'] depends_on: - - postgres - - pulp_api - - pulp_content + postgres: + condition: service_healthy + pulp_api: + pulp_content: ports: - "8080:8080" hostname: pulp @@ -40,8 +41,9 @@ services: replicas: 2 command: ['pulp-api'] depends_on: - - redis - - postgres + redis: + postgres: + condition: service_healthy hostname: pulp-api user: pulp volumes: @@ -59,8 +61,9 @@ services: replicas: 2 command: ['pulp-content'] depends_on: - - redis - - postgres + redis: + postgres: + condition: service_healthy hostname: pulp-content user: pulp volumes: @@ -77,8 +80,9 @@ services: replicas: 2 command: ['pulp-worker'] depends_on: - - redis - - postgres + redis: + postgres: + condition: service_healthy user: pulp volumes: - "./assets/settings.py:/etc/pulp/settings.py:z" diff --git a/images/compose/compose.yaml b/images/compose/compose.yaml index 028e4ac0..8c377eca 100644 --- a/images/compose/compose.yaml +++ b/images/compose/compose.yaml @@ -14,6 +14,11 @@ services: - "pg_data:/var/lib/postgresql" - "./assets/postgres/passwd:/etc/passwd:Z" restart: always + healthcheck: + test: [ "CMD-SHELL", "pg_isready -U pulp" ] + interval: 10s + timeout: 5s + retries: 5 redis: image: "docker.io/library/redis:latest" @@ -25,9 +30,10 @@ services: image: "pulp/pulp-web:latest" command: ['/usr/bin/nginx.sh'] depends_on: - - postgres - - pulp_api - - pulp_content + postgres: + condition: service_healthy + pulp_api: + pulp_content: ports: - "8080:8080" hostname: pulp @@ -43,8 +49,9 @@ services: replicas: 2 command: ['pulp-api'] depends_on: - - redis - - postgres + redis: + postgres: + condition: service_healthy hostname: pulp-api user: pulp volumes: @@ -63,8 +70,9 @@ services: replicas: 2 command: ['pulp-content'] depends_on: - - redis - - postgres + redis: + postgres: + condition: service_healthy hostname: pulp-content user: pulp volumes: @@ -82,8 +90,9 @@ services: replicas: 2 command: ['pulp-worker'] depends_on: - - redis - - postgres + redis: + postgres: + condition: service_healthy user: pulp volumes: - "./assets/settings.py:/etc/pulp/settings.py:z"