-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
75 lines (69 loc) · 1.73 KB
/
docker-compose.yml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
version: '3'
services:
ecto_setup:
build:
context: phoenix_backend
dockerfile: Dockerfile-mix
command: sh -c "sleep 2 && mix ecto.setup"
depends_on:
- postgres
environment:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/phoenix_backend
DB_HOST: postgres
gateway:
build: plug_gateway
depends_on:
- backend
- datadog
environment:
BACKEND_API_URL: http://backend/api
BACKEND_AUTH_TOKEN: "BEAM me up, Spandex!"
PORT: 80
TRACING_HOST: datadog
TRACING_PORT: 8126
TRACING_BATCH_SIZE: 1
TRACING_SYNC_THRESHOLD: 10
ports:
- "4000:80"
backend:
build: phoenix_backend
depends_on:
- ecto_setup
- postgres
- datadog
environment:
AUTH_TOKEN: "BEAM me up, Spandex!"
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/phoenix_backend
PHOENIX_SECRET: "Rma2sZ47QkgKN5hkDjvGSMDhqqOg/olFEs9qMtexSf+UJk0+0n7vA6SAOHBZTaId"
PORT: 80
TRACING_HOST: datadog
TRACING_PORT: 8126
TRACING_BATCH_SIZE: 1
TRACING_SYNC_THRESHOLD: 10
ports:
- "4001:80"
postgres:
image: postgres:latest
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
datadog:
image: datadog/agent:latest
environment:
DD_APM_ENABLED: "true"
DD_APM_ENV: "dev"
DD_APM_NON_LOCAL_TRAFFIC: "true"
env_file:
- datadog.env
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /proc/:/host/proc/:ro
- /sys/fs/cgroup/:/host/sys/fs/cgroup:ro
ports:
- "8125-8126:8125-8126"
volumes:
postgres-data: