forked from LearningLocker/learninglocker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
157 lines (146 loc) · 3.35 KB
/
compose.yaml
File metadata and controls
157 lines (146 loc) · 3.35 KB
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: learninglocker
x-common: &common
build: .
image: ${IMAGE_NAME_PREFIX:-ghcr.io/ude-soco/}learninglocker:${IMAGE_TAG:-latest}
develop:
watch:
- path: package.json
action: rebuild
- path: Dockerfile
action: rebuild
- path: /lib
action: rebuild
environment:
QUEUE_PROVIDER: REDIS
REDIS_HOST: redis
MONGO_HOST: mongo
MONGO_DATABASE: learninglocker_v2
UI_HOST: ui
UI_PORT: 3000
API_HOST: api
API_PORT: 8080
SITE_URL: http://127.0.0.1
LOG_MIN_LEVEL: warning
# SMTP_HOST
# SMTP_PORT
# SMTP_SECURED
# SMTP_USER
# SMTP_PASS
APP_SECRET: "i-am-not-secure-please-change-me"
LL_ADMIN_EMAIL: "admin@mail.com"
LL_ADMIN_ORG: "soco"
LL_ADMIN_PASSWORD: "1234qweR"
services:
ui:
<<: *common
command: ui
ports: ["3000:3000"]
depends_on:
api:
condition: service_healthy
develop:
watch:
- path: /ui
action: rebuild
api:
<<: *common
command: api
ports: ["8080:8080"]
healthcheck:
test: [CMD, node, -e, "'fetch(`http://localhost:8080/`).then(x=>x.status==200?process.exit(0):process.exit(1)).catch(()=>process.exit(1))'"]
start_period: 10s
interval: 10s
depends_on:
mongo:
condition: service_healthy
restart: true
seeds:
condition: service_completed_successfully
redis:
condition: service_healthy
restart: true
develop:
watch:
- path: /api
action: rebuild
worker:
<<: *common
command: worker
depends_on:
mongo:
condition: service_healthy
restart: true
redis:
condition: service_healthy
restart: true
develop:
watch:
- path: /worker
action: rebuild
cli:
<<: *common
profiles: [halted]
command: cli
tty: true
develop:
watch:
- path: /cli
action: rebuild
seeds:
<<: *common
command: seeds
depends_on:
migrations:
condition: service_completed_successfully
restart: on-failure
migrations:
<<: *common
command: migrations
depends_on:
mongo:
condition: service_healthy
restart: true
restart: on-failure
mongo:
image: mongo:4.4
command: mongod --wiredTigerCacheSizeGB 0.25 --quiet --logpath /dev/null
ports: ["27017:27017"]
volumes:
- mongo:/data/db
healthcheck:
test: "mongo --nodb --eval 'disableTelemetry()'; echo 'db.runCommand({ping: 1}).ok' | mongo localhost:27017/test --quiet"
start_period: 2s
interval: 10s
redis:
image: redis:7
command: --loglevel warning
volumes:
- redis:/data
ports: ["6379:6379"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
start_period: 2s
interval: 10s
xapi-service:
image: learninglocker/xapi-service
platform: linux/amd64
ports: ["8081:8081"]
depends_on:
mongo:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- xapi-service:/var/xapi-service
environment:
MODELS_REPO: mongo
MONGO_URL: mongodb://mongo:27017/learninglocker_v2
REDIS_URL: redis://redis:6379/0
EXPRESS_PORT: 8081
FS_LOCAL_STORAGE_DIR: /var/xapi-service
WINSTON_CONSOLE_LEVEL: error
XAPI_PREFIX: /data
volumes:
mongo:
redis:
xapi-service: