-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yml
61 lines (55 loc) · 1.31 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
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!"
PORT: 80
TRACING_HOST: datadog
TRACING_PORT: 8126
ports:
- "4000:80"
backend:
build: phoenix_backend
depends_on:
- ecto_setup
- postgres
- datadog
environment:
AUTH_TOKEN: "BEAM me up!"
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/phoenix_backend"
PHOENIX_SECRET: "Rma2sZ47QkgKN5hkDjvGSMDhqqOg/olFEs9qMtexSf+UJk0+0n7vA6SAOHBZTaId"
PORT: 80
TRACING_HOST: datadog
TRACING_PORT: 8126
ports:
- "4001:80"
postgres:
image: postgres:latest
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
datadog:
image: datadog/agent:latest
environment:
DD_APM_ENABLED: "true"
DD_APM_NON_LOCAL_TRAFFIC: "true"
env_file:
- datadog.env
volumes:
postgres-data: