-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
58 lines (53 loc) · 1.39 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
version: "3.7"
services:
api:
image: "lykinsbd/naas:v0.6.2"
deploy:
mode: "replicated"
replicas: 1
restart_policy:
condition: any
ports:
- target: 443
published: "${NAAS_GLOBAL_PORT:-8443}"
protocol: "tcp"
mode: "ingress"
logging:
options:
max-size: "5m"
max-file: "2"
# Set the environment variables from your launch environment that will be passed into the container
# `:-<value>` sets the default if environment variable is not set
environment:
- "REDIS_HOST=${REDIS_HOST:-redis}"
- "REDIS_PORT=${REDIS_PORT:-6379}"
- "REDIS_PASSWORD=${REDIS_PASSWORD:-mah_redis_pw}"
- "APP_ENVIRONMENT=dev"
- "NAAS_CERT=${NAAS_CERT}"
- "NAAS_KEY=${NAAS_KEY}"
- "NAAS_CA_BUNDLE=${NAAS_CA_BUNDLE}"
networks:
- "naas_overlay"
worker:
image: "lykinsbd/naas:v0.6.2"
deploy:
mode: "replicated"
replicas: ${NAAS_WORKER_REPLICAS:-2}
restart_policy:
condition: any
command: >-
python worker.py
--redis ${REDIS_HOST:-redis}
--port ${REDIS_PORT:-6379}
--auth_password ${REDIS_PASSWORD:-mah_redis_pw}
${NAAS_WORKER_PROCESSES:-100}
healthcheck:
disable: true
networks:
- "naas_overlay"
networks:
naas_overlay:
driver: overlay
driver_opts:
encrypted: 1
name: "naas_overlay"