-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-production.yml
131 lines (120 loc) · 3.18 KB
/
docker-compose-production.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# Copyright 2020 Edouard Maleix, read LICENSE
version: '3.7'
networks:
aloes:
driver: bridge
services:
mongo:
env_file: ./config/mongo/.env
image: mongo:4.1.13
restart: always
volumes:
- ./config/mongo/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh:ro
- mongovolume:/data/db
networks:
- aloes
influxdb:
env_file: ./config/influx/.env
image: influxdb:1.7-alpine
restart: always
volumes:
- influxvolume:/var/lib/influxdb
networks:
- aloes
redis:
image: redis:5-alpine
restart: always
volumes:
- redisvolume:/data
- ./config/redis/redis.conf:/usr/local/etc/redis/redis.conf
networks:
- aloes
command: ['redis-server', '/usr/local/etc/redis/redis.conf']
timer-1:
image: quay.io/esatterwhite/skyring
hostname: timer-1
environment:
- DEBUG=*
- channel__host=timer-1
- nats__hosts=nats-a:4222
- seeds=timer-1:3455
- storage__backend=leveldown
- storage__path=/var/data/skyring
restart: always
depends_on:
- nats-a
networks:
- aloes
nats-a:
image: nats:latest
restart: always
networks:
- aloes
async-api-1:
image: getlarge/aloes-async-api:staging
container_name: async-api-1
env_file: .env
environment:
- SERVER_LOGGER_LEVEL=4
restart: always
volumes:
- ./.env:/home/node/device-manager/.env:ro
- ./deploy/key.pem:/home/node/device-manager/deploy/key.pem
- ./deploy/cert.pem:/home/node/device-manager/deploy/cert.pem
depends_on:
- redis
networks:
- aloes
rest-api-1:
image: getlarge/aloes-rest-api:staging
container_name: rest-api-1
env_file: .env
environment:
- SERVER_LOGGER_LEVEL=4
- INSTANCES_COUNT=2
- INSTANCES_PREFIX=1
restart: always
volumes:
- ./.env:/home/node/device-manager/.env:ro
- apivolume:/home/node/device-manager/storage
- ./deploy/key.pem:/home/node/device-manager/deploy/key.pem
- ./deploy/cert.pem:/home/node/device-manager/deploy/cert.pem
depends_on:
- mongo
- influxdb
- redis
- timer-1
- async-api-1
networks:
- aloes
api-proxy:
environment:
- WS_BROKER_PORT=${WS_BROKER_PORT}
- MQTT_BROKER_PORT=${MQTT_BROKER_PORT}
- HTTP_SERVER_PORT=${HTTP_SERVER_PORT}
- NGINX_SERVER_HOST=${DOMAIN}
image: nginx:latest
restart: always
volumes:
- ./config/nginx/nginx-production.template:/etc/nginx/nginx.template
- ./deploy/key.pem:/etc/nginx/certs/${DOMAIN}/key.pem
- ./deploy/cert.pem:/etc/nginx/certs/${DOMAIN}/cert.pem
- ./deploy/dhparam.pem:/etc/nginx/certs/dhparam.pem
- ./log/nginx:/etc/nginx/log
depends_on:
- mqtt-api-1
- http-api-1
- timer-1
ports:
- '80:80'
- '443:443'
- '1883:1883'
- '8883:8883'
networks:
- aloes
command: /bin/bash -c "envsubst '$${HTTP_SERVER_PORT},$${WS_BROKER_PORT},$${MQTT_BROKER_PORT},$${NGINX_SERVER_HOST}' < /etc/nginx/nginx.template > /etc/nginx/nginx.conf && exec nginx -g 'daemon off;'"
volumes:
mongovolume:
redisvolume:
influxvolume:
apivolume: