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: image: git.maxboeer.com/schuwi/components-elixir:latest ports: - "4000:4000" environment: DATABASE_URL: "ecto://postgres:postgres@db:5432/components_elixir_prod" SECRET_KEY_BASE: "your-secret-key-here" # Generate with: mix phx.gen.secret PHX_HOST: "localhost" PHX_SERVER: "true" PORT: "4000" UPLOADS_DIR: "/data/uploads" AUTH_PASSWORD: "changeme!" depends_on: db: condition: service_healthy volumes: - uploaded_files:/data/uploads command: [ "/bin/sh", "-c", "/app/bin/components_elixir eval 'ComponentsElixir.Release.migrate' && /app/bin/components_elixir start", ] volumes: postgres_data: uploaded_files: