Skip to content

Update Docker Compose deploy scripts #126

@Besthope-Official

Description

@Besthope-Official

Use Case

Docker Compose deploy scripts have outdated config and missing resilience settings, causing deprecation warnings and potential startup race conditions.

Proposed Solution

  1. Remove version: '3.9' from docker-compose.yml and docker-compose.dev.yml

    • Obsolete in Docker Compose V2, emits a warning on every run
  2. Use depends_on with health conditions in docker-compose.yml

    depends_on:
      db:
        condition: service_healthy
      redis:
        condition: service_healthy
  3. Add healthcheck for Redis in docker-compose.yml

    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 10s
      timeout: 5s
      retries: 5
  4. Add restart: unless-stopped to app service for production

Alternatives Considered

N/A

Implementation Notes

  • Files affected: docker/docker-compose.yml, docker/docker-compose.dev.yml
  • The entrypoint.sh Postgres wait loop can be kept as a fallback, but service_healthy should be the primary mechanism

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions