-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
105 lines (94 loc) · 2.62 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
version: "3.8"
services:
postgres:
image: postgres:11-alpine
environment:
- POSTGRES_DB:${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASS}
ports:
- "5432:5432" # for debugging db
ipfs:
image: ipfs/go-ipfs:v0.6.0
ports:
- "8100:8080" # gateway for debugging
- "5001:5001" # API for debugging
server:
build: .
image: aragon/ipfs-pinner
command: yarn start:server:dev
depends_on:
- postgres
- ipfs
- loki
ports:
- "${SERVER_PORT}:${SERVER_PORT}"
- "${SERVER_METRICS_PORT}:${SERVER_METRICS_PORT}" # for debugging metrics
volumes:
# speed up development by mounting some local directories with hot reload
- ./packages/server/src:/app/packages/server/src
- ./packages/shared/build:/app/packages/shared/build
env_file:
- .env
logging: &loki
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
# required to be compatible with k8s metrics
loki-external-labels: container={{.Name}},app=ipfs-pinner
worker:
build: .
image: aragon/ipfs-pinner
command: yarn start:worker:dev
depends_on:
- server
ports:
- "${WORKER_METRICS_PORT}:${WORKER_METRICS_PORT}" # for debugging metrics
volumes:
# speed up development by mounting some local directories with hot reload
- ./packages/worker/src:/app/packages/worker/src
- ./packages/shared/build:/app/packages/shared/build
env_file:
- .env
logging: *loki
# for running test commands
test:
build: .
image: aragon/ipfs-pinner
command: sleep infinity
depends_on:
- postgres
- ipfs
volumes:
# speed up development by mounting some local directories with hot reload
- ./packages/server/src:/app/packages/server/src
- ./packages/server/test:/app/packages/server/test
- ./packages/worker/src:/app/packages/worker/src
- ./packages/worker/test:/app/packages/worker/test
- ./packages/shared/build:/app/packages/shared/build
- ./packages/client/build:/app/packages/client/build
env_file:
- .env
## Monitoring containers below
prometheus:
image: prom/prometheus
depends_on:
- server
volumes:
- ./monitoring/prometheus:/etc/prometheus
loki:
image: grafana/loki
ports:
- "3100:3100" # required for loki plugin to work
grafana:
image: grafana/grafana
depends_on:
- prometheus
- loki
ports:
- "5000:3000"
environment:
GF_AUTH_ANONYMOUS_ENABLED: "true"
GF_AUTH_ANONYMOUS_ORG_ROLE: Admin
volumes:
- ./monitoring/grafana/provisioning:/etc/grafana/provisioning