fix(elixir): missing release files
This commit is contained in:
39
docker-compose.yml.example
Normal file
39
docker-compose.yml.example
Normal file
@@ -0,0 +1,39 @@
|
||||
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: "your-secret-key-here" # Generate with: mix phx.gen.secret
|
||||
PHX_HOST: "localhost"
|
||||
PHX_SERVER: "true"
|
||||
PORT: "4000"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
command:
|
||||
[
|
||||
"/bin/sh",
|
||||
"-c",
|
||||
"/app/bin/components_elixir eval 'ComponentsElixir.Release.migrate' && /app/bin/components_elixir start",
|
||||
]
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
Reference in New Issue
Block a user