-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.staging.yaml
91 lines (78 loc) · 3.63 KB
/
docker-compose.staging.yaml
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
# this is the staging docker compose; add dev folders in arena web; used for remote development
#
# run staging:
# docker-compose -f docker-compose.yaml -f docker-compose.staging.yaml up -d
#
version: '3'
services:
arena-web: # create a container named "arena-web"; other service containers in this file can resolve its name (arena-web)
image: "nginx" # creates container from nginx
volumes:
- ./conf/staging/arena-web.conf:/etc/nginx/conf.d/arena-web-staging.conf:ro # mount nginx config
- ./arena-web-core:/usr/share/nginx/html:rw # mount root html from ./arena-web-core
- ./conf/staging/arena-web-conf:/usr/share/nginx/html/conf:ro # arena web client code conf
- ./store:/usr/share/nginx/html/store:ro # mount store
- ./data/certbot/www:/var/www/certbot:ro # mount certbot files (used in conf/staging/arena-web.conf)
- account-static-content:/usr/share/nginx/html/user/static:ro # serve account static files
- ../dev:/usr/share/nginx/html/dev:ro # mount dev folder
ports:
- "80:80" # map port 80 on the host to port 80 on the container
- "443:443"
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'" # reload certificates every 6h
restart: unless-stopped # service will respawn unless we tell docker to stop it
certbot:
image: certbot/certbot
restart: unless-stopped
volumes:
- ./data/certbot/conf:/etc/letsencrypt:rw # mount certbot files; certificate files will be here
- ./data/certbot/www:/var/www/certbot:rw # mount certbot files;
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'" # check for certificate updates every 12h
mongodb:
image: mongo:latest # pull from https://hub.docker.com/_/mongo/
restart: unless-stopped
arena-persist:
build: "arena-persist" # builds container from arena-persist Dockerfile
restart: unless-stopped
arena-account:
build: "arena-account" # builds container from arena-account Dockerfile
restart: unless-stopped
mqtt:
image: conixcenter/arena-broker # pulls from https://hub.docker.com/repository/docker/conixcenter/arena-broker
restart: unless-stopped
store:
# version #, settings, and full inline script from /storemng must match ./init-utils/filebrowserScriptToHash.js values
image: "filebrowser/filebrowser:latest" # pulls from https://hub.docker.com/r/filebrowser/filebrowser
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
ports:
- 8080:8080
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
restart: unless-stopped # service will respawn unless we tell docker to stop it
arena-host-stats:
image: prom/node-exporter:latest
restart: unless-stopped # service will respawn unless we tell docker to stop it
prometheus:
image: prom/prometheus:latest
user: "root"
volumes:
- ./conf/staging/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- ./data/prometheus/:/prometheus/
command: [ "--config.file=/etc/prometheus/prometheus.yml", "--storage.tsdb.path=/prometheus", "--storage.tsdb.retention.time=30d" ]
restart: unless-stopped # service will respawn unless we tell docker to stop it
grafana:
image: grafana/grafana:latest
user: "root"
ports:
- 3000:3000
volumes:
- ./data/grafana:/var/lib/grafana:rw
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_NAME=CONIX
restart: unless-stopped # service will respawn unless we tell docker to stop it
volumes:
account-static-content: