Add restart policy to six services in docker-compose-capif.yml

Closes #242 (closed)

Description

Adds restart: unless-stopped to the six services in services/docker-compose-capif.yml that had no restart policy: redis, api-provider-management, capif-events, capif-routing-info, celery_worker, celery_beat. All other services already use it.

Why this is needed

After a host reboot or a Docker daemon restart, services without a policy stay down. If Redis stays down, the services that depend on it fail at start-up.

Checked

  • docker compose config validates with variables.sh loaded.
  • Every service now has a restart entry; the diff is 6 added lines and nothing else.
  • On our v5 deployment, the same policy (set with docker update) kept all containers up across a VM reboot.
  • A deployment with this updated restart policy is tested and running in our testbed VM.

Merge request reports

Loading
+6
Changes for services/docker-compose-capif.yml: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ services:
      - ${SERVICES_DIR}/redis.conf:/usr/local/etc/redis/redis.conf
    environment:
      - REDIS_REPLICATION_MODE=master
    restart: unless-stopped
    

  helper:
@@ -116,6 +117,7 @@ services:
      - VAULT_ACCESS_TOKEN=${CAPIF_VAULT_TOKEN}
      - VAULT_PORT=${CAPIF_VAULT_PORT}
      - LOG_LEVEL=${LOG_LEVEL}
    restart: unless-stopped
    depends_on:
      - redis
      - nginx
@@ -208,6 +210,7 @@ services:
      - host.docker.internal:host-gateway
      - fluent-bit:host-gateway
      - otel-collector:host-gateway
    restart: unless-stopped
    depends_on:
      - redis
      - mongo
@@ -223,6 +226,7 @@ services:
      - REDIS_PORT=6379
      - LOG_LEVEL=${LOG_LEVEL}
      - CELERY_LOG_FILE=worker.log
    restart: unless-stopped
    depends_on:
      - redis
      - mongo
@@ -238,6 +242,7 @@ services:
      - REDIS_PORT=6379
      - LOG_LEVEL=${LOG_LEVEL}
      - CELERY_LOG_FILE=beat.log
    restart: unless-stopped
    depends_on:
      - redis
      - mongo
@@ -299,6 +304,7 @@ services:
    expose:
      - "8080"
    image: ${REGISTRY_BASE_URL}/ocf-routing-info-api:${OCF_VERSION}
    restart: unless-stopped

  capif-security:
    container_name: ${CAPIF_SECURITY_CONTAINER_NAME:-capif-security}
Loading