services: db: image: postgres:15 environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: components_elixir_prod ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 10s timeout: 5s retries: 5 app: build: . ports: - "4000:4000" environment: DATABASE_URL: "ecto://postgres:postgres@db:5432/components_elixir_prod" SECRET_KEY_BASE: "WYxST6ZVqFdeXRfjP3MUAc+hNVCJ6LW/+aqwuP27Ab77R4yXFQlO2HsukrOzCVif" PHX_HOST: "localhost" PHX_SERVER: "true" PORT: "4000" depends_on: db: condition: service_healthy command: ["/bin/sh", "-c", "/app/bin/migrate && /app/bin/server"] volumes: postgres_data: