forked from LianjiaTech/bella-openapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
98 lines (94 loc) · 3.01 KB
/
docker-compose.yml
File metadata and controls
98 lines (94 loc) · 3.01 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
services:
api:
image: ${REGISTRY:-bellatop}/bella-openapi-api:${VERSION:-latest}
build:
context: ./api
container_name: bella-openapi-api
expose:
- "8080"
environment:
- JAVA_OPTS=-server -Xms2048m -Xmx2048m -XX:MetaspaceSize=512m -XX:MaxMetaspaceSize=512m -Dbella.proxy.host=${PROXY_HOST:-} -Dbella.proxy.port=${PROXY_PORT:-} -Dbella.proxy.type=${PROXY_TYPE:-} -Dbella.proxy.domains=${PROXY_DOMAINS:-}
- SPRING_PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE:-docker}
- SERVER_DOMAIN=${SERVER_DOMAIN:-localhost}
- SERVER=${SERVER:-http://localhost}
- login.type=${LOGIN_TYPE:-}
- google.enable=${GOOGLE_ENABLE:-false}
- google.clientId=${GOOGLE_CLIENT_ID:-}
- google.secret=${GOOGLE_CLIENT_SECRET:-}
- github.enable=${GITHUB_ENABLE:-false}
- github.clientId=${GITHUB_CLIENT_ID:-}
- github.secret=${GITHUB_CLIENT_SECRET:-}
- redirect.baseUrl=${REDIRECT_BASE_URL:-localhost}
- cas.server=${CAS_SERVER:-}
- cas.server.login=${CAS_LOGIN:-}
volumes:
- ./api/applogs:/opt/bella-openapi/applogs
- ./api/logs:/opt/bella-openapi/logs
- ./api/cache:/opt/bella-openapi/cache
- ./api/privdata:/opt/bella-openapi/privdata
- ./api/config-cache:/opt/bella-openapi/config-cache
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
web:
image: ${REGISTRY:-bellatop}/bella-openapi-web:${VERSION:-latest}
build:
context: ./web
args:
- NODE_ENV=${NODE_ENV:-production}
- DEPLOY_ENV=${DEPLOY_ENV:-production}
container_name: bella-openapi-web
expose:
- "3000"
depends_on:
- api
nginx:
image: nginx:latest
container_name: bella-openapi-nginx
ports:
- "${NGINX_PORT:-80}:80"
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
environment:
- SERVER_DOMAIN=${SERVER_DOMAIN:-localhost}
depends_on:
- api
- web
mysql:
image: mysql:8.0
container_name: bella-openapi-mysql
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_0900_ai_ci
environment:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_DATABASE: bella_openapi
MYSQL_USER: bella_user
MYSQL_PASSWORD: 123456
ports:
- "127.0.0.1:3306:3306"
volumes:
- ./mysql/data:/var/lib/mysql
- ./api/server/sql:/docker-entrypoint-initdb.d
privileged: true
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "bella_user", "--password=123456"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:6
container_name: bella-openapi-redis
command: redis-server --requirepass 123456
ports:
- "127.0.0.1:6379:6379"
volumes:
- ./redis/data:/data
privileged: true
sysctls:
- net.core.somaxconn=1024
healthcheck:
test: ["CMD", "redis-cli", "-a", "123456", "ping"]
interval: 5s
timeout: 5s
retries: 5