-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelixir-phoenix.drawbridge.yml
More file actions
53 lines (47 loc) · 1.46 KB
/
elixir-phoenix.drawbridge.yml
File metadata and controls
53 lines (47 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Elixir Phoenix — web app + Postgres + Redis + optional Elasticsearch
# Comment out elasticsearch if you don't need search
domain: dev.local
idle_timeout: 300
max_containers: 6
services:
# --- Backing services ---
postgres:
image: postgres:16
hostname: postgres.dev.local
ports:
- "5432:5432"
env:
POSTGRES_PASSWORD: dev
POSTGRES_DB: myapp_dev
idle_timeout: 1800
redis:
image: redis:7
hostname: redis.dev.local
ports:
- "6379:6379"
idle_timeout: 1800
# Optional — uncomment if your app uses search
elasticsearch:
image: elasticsearch:8.17.0
hostname: es.dev.local
ports:
- "9200:9200"
env:
discovery.type: single-node
xpack.security.enabled: "false"
boot_timeout: 60 # ES is slow to start — give it a minute
idle_timeout: 900
# --- Application ---
web:
image: ghcr.io/yourorg/myapp:latest
hostname: myapp.dev.local
ports:
- "443:4000" # TLS on 443, Phoenix listens on 4000
env:
DATABASE_URL: "postgres://postgres:dev@postgres.dev.local:5432/myapp_dev"
REDIS_URL: "redis://redis.dev.local:6379"
ELASTICSEARCH_URL: "http://es.dev.local:9200"
SECRET_KEY_BASE: "dev-secret-key-base-at-least-64-bytes-long-replace-me-in-prod"
PHX_HOST: myapp.dev.local
depends_on: [postgres, redis] # Add elasticsearch here if required at boot
health_check: "curl -sf http://localhost:4000/health"