-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.localdev.yaml
85 lines (76 loc) · 3.63 KB
/
docker-compose.localdev.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
# this is the development docker compose; does not include containers not needed and adds some config for development
#
# run development:
# docker-compose 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/localdev/arena-web.conf:/etc/nginx/conf.d/arena-web.conf:ro # mount nginx config
- ./arena-web-core:/usr/share/nginx/html:rw # mount root html from ./arena-web-core
- ./conf/localdev/arena-web-conf:/usr/share/nginx/html/conf:ro # arena client code conf
- ./store:/usr/share/nginx/html/store:ro # mount store files
- ./data/certbot/conf:/etc/letsencrypt:ro # mount certbot files (used in conf/nginx-conf.d/arena-web.conf)
- ./data/certbot/www:/var/www/certbot:ro # mount certbot files (used in conf/nginx-conf.d/arena-web.conf)
#- arts-static-content:/usr/share/nginx/html/arts:ro # serve arts static files
- account-static-content:/usr/share/nginx/account-static:ro # serve account static files
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
depends_on:
- mqtt
- arena-persist
- store
- arena-account
mongodb:
image: mongo # pull from https://hub.docker.com/_/mongo/
volumes:
- ./data/mongodb:/data/db:rw # permanent storage on the host
arena-persist:
build: "arena-persist" # builds container from arena-persist Dockerfile
user: "node"
volumes:
- ./conf/persist-config.json:/home/node/app/config.json:ro # mount updated config.json that uses the container name
- ./data/keys/jwt.public.pem:/home/node/app/pubsubkey.pub:ro # pubsub public key available to persist
working_dir: /home/node/app
command: "npm run start"
depends_on:
- mongodb
- mqtt
arena-account:
build: "arena-account" # builds container from arena-account Dockerfile
volumes:
- ./conf/account-settings.py:/usr/src/app/arena_account/settings.py:ro
- account-static-content:/usr/src/app/static # static content
- ./data/keys/jwt.priv.pem:/home/node/app/pubsubkey.pem:ro # pubsub key available to service
- ./data/account:/usr/src/app/db # account db
tty: true
env_file:
- .env
- secret.env
command: "python manage.py runserver 0.0.0.0:8000"
depends_on:
- arena-persist
mqtt:
image: conixcenter/arena-broker # pulls from https://hub.docker.com/repository/docker/conixcenter/arena-broker
volumes:
- ./conf/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro # mount local config file to /mosquitto/config/mosquitto.conf in the container
- ./data/keys/jwt.public.der:/pubsubkey.der:ro # pubsub key available to service
- ./data/certbot/conf:/etc/letsencrypt:ro # mount certs volume (see conf/mosquitto.conf to see how the files are used)
env_file: secret.env
ports:
- 8083:8083/tcp # mqtt-wss
- 8883:8883/tcp # mqtt-tls
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
volumes:
- ./conf/store-config.json:/.filebrowser.json:ro
- ./store-branding:/arena-store/frontend/arena-branding:ro
- ./store:/srv-files:rw
- ./data/arena-store:/arena-store/data:rw
volumes:
account-static-content: