diff --git a/images/compose/compose.folders.yml b/images/compose/compose.folders.yml index 4b16e8aa..ca07d7d9 100644 --- a/images/compose/compose.folders.yml +++ b/images/compose/compose.folders.yml @@ -13,18 +13,28 @@ services: volumes: - "../../pgsql:/var/lib/postgresql:Z" - "./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" volumes: - "redis_data:/data" + restart: always + healthcheck: + test: [ "CMD-SHELL", "redis-cli ping" ] + interval: 10s + timeout: 5s + retries: 5 pulp_web: image: "pulp/pulp-web:latest" command: ['/usr/bin/nginx.sh'] depends_on: - postgres: - condition: service_healthy pulp_api: pulp_content: ports: @@ -34,6 +44,7 @@ services: volumes: - "./assets/bin/nginx.sh:/usr/bin/nginx.sh:Z" - "./assets/nginx/nginx.conf.template:/etc/opt/rh/rh-nginx116/nginx/nginx.conf.template:Z" + restart: always pulp_api: image: "pulp/pulp-minimal:latest" @@ -42,6 +53,7 @@ services: command: ['pulp-api'] depends_on: redis: + condition: service_healthy postgres: condition: service_healthy hostname: pulp-api @@ -52,6 +64,12 @@ services: - "../../pulp_storage:/var/lib/pulp:z" environment: PULP_DEFAULT_ADMIN_PASSWORD: password + restart: always + healthcheck: + test: [ "CMD-SHELL", "readyz.py /pulp/api/v3/status/" ] + interval: 10s + timeout: 5s + retries: 5 pulp_content: image: "pulp/pulp-minimal:latest" @@ -60,6 +78,7 @@ services: command: ['pulp-content'] depends_on: redis: + condition: service_healthy postgres: condition: service_healthy hostname: pulp-content @@ -68,6 +87,12 @@ services: - "./assets/settings.py:/etc/pulp/settings.py:z" - "./assets/certs:/etc/pulp/certs:z" - "../../pulp_storage:/var/lib/pulp:z" + restart: always + healthcheck: + test: [ "CMD-SHELL", "readyz.py /pulp/content/" ] + interval: 10s + timeout: 5s + retries: 5 pulp_worker: image: "pulp/pulp-minimal:latest" @@ -76,6 +101,7 @@ services: command: ['pulp-worker'] depends_on: redis: + condition: service_healthy postgres: condition: service_healthy user: pulp @@ -83,6 +109,7 @@ services: - "./assets/settings.py:/etc/pulp/settings.py:z" - "./assets/certs:/etc/pulp/certs:z" - "../../pulp_storage:/var/lib/pulp:z" + restart: always volumes: redis_data: diff --git a/images/compose/compose.yml b/images/compose/compose.yml index 40c93161..6eace6d6 100644 --- a/images/compose/compose.yml +++ b/images/compose/compose.yml @@ -25,13 +25,16 @@ services: volumes: - "redis_data:/data" restart: always + healthcheck: + test: [ "CMD-SHELL", "redis-cli ping" ] + interval: 10s + timeout: 5s + retries: 5 pulp_web: image: "pulp/pulp-web:latest" command: ['/usr/bin/nginx.sh'] depends_on: - postgres: - condition: service_healthy pulp_api: pulp_content: ports: @@ -50,6 +53,7 @@ services: command: ['pulp-api'] depends_on: redis: + condition: service_healthy postgres: condition: service_healthy hostname: pulp-api @@ -61,6 +65,11 @@ services: environment: PULP_DEFAULT_ADMIN_PASSWORD: password restart: always + healthcheck: + test: [ "CMD-SHELL", "readyz.py /pulp/api/v3/status/" ] + interval: 10s + timeout: 5s + retries: 5 pulp_content: image: "pulp/pulp-minimal:latest" @@ -69,6 +78,7 @@ services: command: ['pulp-content'] depends_on: redis: + condition: service_healthy postgres: condition: service_healthy hostname: pulp-content @@ -78,6 +88,11 @@ services: - "./assets/certs:/etc/pulp/certs:z" - "pulp:/var/lib/pulp" restart: always + healthcheck: + test: [ "CMD-SHELL", "readyz.py /pulp/content/" ] + interval: 10s + timeout: 5s + retries: 5 pulp_worker: image: "pulp/pulp-minimal:latest" @@ -86,6 +101,7 @@ services: command: ['pulp-worker'] depends_on: redis: + condition: service_healthy postgres: condition: service_healthy user: pulp