-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
61 lines (58 loc) · 1.84 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
name: erp-docker-compose
services:
erp-backend:
ports:
- '9999'
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql:$MYSQL_SERVER_PORT/jsh_erp?useUnicode=true&characterEncoding=utf8&useCursorFetch=true&defaultFetchSize=500&allowMultiQueries=true&rewriteBatchedStatements=true&useSSL=false
SPRING_DATASOURCE_USERNAME: jsh_erp
SPRING_DATASOURCE_PASSWORD: $MYSQL_USER_PASSWORD
SPRING_REDIS_HOST: redis
SPRING_REDIS_PASSWORD: $REDIS_PASSWORD
MYSQL_SERVER_PORT: $MYSQL_SERVER_PORT
image: openjdk:8-jdk
working_dir: /home/jshERP/jshERP-boot
volumes:
- ./jshERP3.3-最新包/后端包/jshERP:/home/jshERP/jshERP-boot
- ./wait-for-mysqld-and-start.sh:/home/jshERP/jshERP-boot/wait-for-mysqld-and-start.sh
entrypoint: ./wait-for-mysqld-and-start.sh
depends_on:
- mysql
- redis
restart: unless-stopped
redis:
image: redis:5
ports:
- '6379'
command: ['redis-server', '--requirepass', '$REDIS_PASSWORD']
restart: unless-stopped
mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: jsh_erp
MYSQL_USER: jsh_erp
MYSQL_PASSWORD: $MYSQL_USER_PASSWORD
ports:
- '3306'
command:
[
'sh',
'-c',
'chmod 444 /etc/mysql/conf.d/utf8mb4.cnf && exec docker-entrypoint.sh mysqld',
]
volumes:
- ./utf8mb4.cnf:/etc/mysql/conf.d/utf8mb4.cnf
- ./jshERP3.3-最新包/后端包/jshERP/docs/jsh_erp.sql:/docker-entrypoint-initdb.d/jsh_erp.sql
- ./mysqldata:/var/lib/mysql
restart: unless-stopped
nginx:
image: nginx:1.21.5
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./jshERP3.3-最新包/前端包/dist:/home/jshERP/jshERP-web
ports:
- '127.0.0.1:3000:3000'
depends_on:
- erp-backend
restart: unless-stopped