Files
component-system/docker-compose.yml.example
Schuwi c444597632
All checks were successful
Code Quality / Code Quality (Elixir 1.15.7 OTP 26.2) (push) Successful in 1m59s
Docker Build and Publish / docker-build (push) Successful in 59s
fix: auth password for production
- set password with runtime env variable
2025-09-21 12:13:20 +02:00

45 lines
1.1 KiB
Plaintext

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: