forked from labring/laf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
147 lines (138 loc) · 4.52 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
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
# !!! This compose file only for development use
version: '3.8'
services:
mongo:
image: bitnami/mongodb:5.0.8
environment:
- MONGODB_REPLICA_SET_MODE=primary
- MONGODB_ADVERTISED_HOSTNAME=mongo
- MONGODB_REPLICA_SET_NAME=laf
- MONGODB_REPLICA_SET_KEY=replicasetkey123
- MONGODB_ENABLE_DIRECTORY_PER_DB=yes
- MONGODB_ROOT_PASSWORD=password123
- MONGODB_USERNAME=my_user
- MONGODB_PASSWORD=password123
- MONGODB_DATABASE=laf-sys
volumes:
- db-data:/bitnami/mongodb
ports:
- "27017:27017"
networks:
- laf_shared_network
oss:
image: 'bitnami/minio:2022.4.12'
environment:
- MINIO_ROOT_USER=minio-root-user
- MINIO_ROOT_PASSWORD=minio-root-password
- MINIO_DISTRIBUTED_MODE_ENABLED=yes
- MINIO_DISTRIBUTED_NODES=oss/data/{0...3}
- MINIO_SKIP_CLIENT=yes
- MINIO_REGION_NAME=cn-default
- MINIO_DOMAIN=oss.local-dev.host
ports:
- "9020:9000"
- "9120:9001"
volumes:
- oss-data:/data
networks:
- laf_shared_network
system-server:
build: ./packages/system-server
user: root
working_dir: /app
environment:
SYS_DB_URI: mongodb://my_user:password123@mongo:27017/?authSource=laf-sys&replicaSet=laf&writeConcern=majority
APP_DB_URI: mongodb://root:password123@mongo:27017/?authSource=admin&replicaSet=laf&writeConcern=majority
SYS_SERVER_SECRET_SALT: Rewrite_Your_Own_Secret_Salt_abcdefg1234567
LOG_LEVEL: debug
ACCOUNT_DEFAULT_APP_QUOTA: 5
APP_SERVICE_IMAGE: lafyun/app-service:latest
APP_SERVICE_DEPLOY_HOST: local-dev.host:8080 # `*.local-dev.host` always resolved to 127.0.0.1, used to local development
APP_SERVICE_DEPLOY_URL_SCHEMA: 'http'
MINIO_ACCESS_KEY: minio-root-user
MINIO_ACCESS_SECRET: minio-root-password
MINIO_INTERNAL_ENDPOINT: http://oss:9000
MINIO_EXTERNAL_ENDPOINT: http://oss.local-dev.host:8080
MINIO_REGION_NAME: cn-default
INIT_ROOT_ACCOUNT_PASSWORD: abc123
INIT_ROOT_ACCOUNT: root
SYSTEM_EXTENSION_APPID: '000000'
APPID_LENGTH: 6
command: sh /app/start.sh
volumes:
- ./packages/system-server:/app
- ./packages/database-proxy:/app/node_modules/database-proxy:ro
- ./packages/database-ql:/app/node_modules/database-ql:ro
- ./packages/database-ql:/app/node_modules/database-proxy/node_modules/database-ql:ro
ports:
- "9000"
depends_on:
- mongo
restart: always
networks:
- laf_shared_network
instance-controller:
build: ./packages/instance-controller
user: root
working_dir: /app
environment:
SCHEDULER_INTERVAL: 1000
SYS_DB_URI: mongodb://my_user:password123@mongo:27017/?authSource=laf-sys&replicaSet=laf&writeConcern=majority
APP_DB_URI: mongodb://root:password123@mongo:27017/?authSource=admin&replicaSet=laf&writeConcern=majority
SHARED_NETWORK: laf_shared_network
LOG_LEVEL: debug
SERVICE_DRIVER: docker
APP_SERVICE_ENV_NPM_INSTALL_FLAGS: '--registry=https://registry.npm.taobao.org --no-audit --no-fund'
MINIO_INTERNAL_ENDPOINT: http://oss:9000
MINIO_EXTERNAL_ENDPOINT: http://oss.local-dev.host:8080
MINIO_REGION_NAME: cn-default
DEBUG_BIND_HOST_APP_PATH: '${PWD}/packages/app-service'
SYSTEM_EXTENSION_APPID: '000000'
command: node ./dist/index.js
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./packages/instance-controller:/app
ports:
- "9000"
depends_on:
- mongo
restart: always
networks:
- laf_shared_network
gateway:
image: openresty/openresty:latest
depends_on:
- mongo
- system-server
environment:
DEPLOY_DOMAIN: "*.local-dev.host" # `*.local-dev.host` always resolved to 127.0.0.1, used to local development
DEPLOY_OSS_DOMAIN: "oss.local-dev.host"
SYS_CLIENT_HOST: console.local-dev.host
SYSTEM_EXTENSION_APPID: '000000'
volumes:
- ./packages/gateway/scripts:/scripts
- ./packages/gateway/conf.docker:/conf.docker
command: "sh /scripts/start.sh"
ports:
- 8080:80
networks:
- laf_shared_network
system-client:
build: ./packages/system-client
volumes:
- ./packages/system-client/dist:/app
networks:
- laf_shared_network
app-console:
build: ./packages/app-console
volumes:
- ./packages/app-console/dist:/app
networks:
- laf_shared_network
volumes:
db-data:
oss-data:
etcd-data:
networks:
laf_shared_network:
external: true