-
Notifications
You must be signed in to change notification settings - Fork 241
/
Copy pathdocker-compose-multi.yaml
132 lines (124 loc) · 3.63 KB
/
docker-compose-multi.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
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
services:
##
## Start services required for Lowcoder (MongoDB and Redis)
##
mongodb:
image: "mongo:7.0"
container_name: mongodb
environment:
MONGO_INITDB_DATABASE: lowcoder
MONGO_INITDB_ROOT_USERNAME: lowcoder
MONGO_INITDB_ROOT_PASSWORD: secret123
volumes:
- ./lowcoder-stacks/data/mongodb:/data/db
restart: unless-stopped
healthcheck: # https://github.com/rodrigobdz/docker-compose-healthchecks?tab=readme-ov-file#mongo
test:
[
"CMD",
"mongosh",
"--quiet",
"127.0.0.1/test",
"--eval",
"'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)'",
]
interval: 5s
timeout: 10s
retries: 10
start_period: 40s
redis:
image: redis:7-alpine
container_name: redis
restart: unless-stopped
healthcheck: # https://stackoverflow.com/a/71504657
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 1s
timeout: 3s
retries: 10
##
## Start Lowcoder backend services (api-service and node-service)
##
lowcoder-api-service:
image: lowcoderorg/lowcoder-ce-api-service:latest
container_name: lowcoder-api-service
# Enabled ports to be able to access backend from host
# ports:
# - "8080:8080"
env_file:
- path: ./default.env
required: true
- path: ./default-multi.env
required: true
- path: ./override.env
required: false
restart: unless-stopped
depends_on:
mongodb:
condition: service_healthy
restart: true
redis:
condition: service_healthy
restart: true
volumes:
- ./lowcoder-stacks:/lowcoder-stacks
- ./lowcoder-stacks/assets:/lowcoder/assets
healthcheck: #https://stackoverflow.com/questions/71101967/how-should-i-use-grep-in-docker-compose-healthcheck
test: curl -sS http://lowcoder-api-service:8080 | grep -c "Lowcoder API is up and runnig" > /dev/null
interval: 3s
timeout: 5s
retries: 10
lowcoder-node-service:
image: lowcoderorg/lowcoder-ce-node-service:latest
container_name: lowcoder-node-service
# Enabled ports to be able to access backend from host
# ports:
# - "6060:6060"
env_file:
- path: ./default.env
required: true
- path: ./default-multi.env
required: true
- path: ./override.env
required: false
restart: unless-stopped
depends_on:
lowcoder-api-service:
condition: service_healthy
restart: true
healthcheck: #https://stackoverflow.com/questions/71101967/how-should-i-use-grep-in-docker-compose-healthcheck
test: curl -sS http://lowcoder-node-service:6060 | grep -c "Lowcoder Node Service is up and running" > /dev/null
interval: 3s
timeout: 5s
retries: 10
##
## Start Lowcoder web frontend
##
lowcoder-frontend:
image: lowcoderorg/lowcoder-ce-frontend:latest
container_name: lowcoder-frontend
ports:
- "3000:3000"
env_file:
- path: ./default.env
required: true
- path: ./default-multi.env
required: true
- path: ./override.env
required: false
restart: unless-stopped
depends_on:
lowcoder-node-service:
condition: service_healthy
restart: true
lowcoder-api-service:
condition: service_healthy
restart: true
volumes:
- ./lowcoder-stacks/assets:/lowcoder/assets
- ./lowcoder-stacks/ssl:/lowcoder-stacks/ssl
healthcheck:
test: curl --fail http://lowcoder-frontend:3000 || exit 1
interval: 5s
retries: 10
start_period: 10s
timeout: 10s