-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
38 lines (37 loc) · 1.23 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
version: "2"
services:
qiezi_front:
image: nginx
networks:
- qiezi_statistic
volumes:
- /etc/localtime:/etc/localtime
- ./data/timezone:/etc/timezone
- ./qiezi_front/dist:/opt/dist
- ./data/nginx/nginx.conf:/etc/nginx/nginx.conf
ports:
- ${NGINX_PORT}:8080
qiezi_backend:
image: openjdk:11.0
networks:
- qiezi_statistic
volumes:
- /etc/localtime:/etc/localtime
- ./data/timezone:/etc/timezone
- ./qieziBackend/target/backend-0.0.1-SNAPSHOT.jar:/opt/app/service.jar
working_dir: /opt/app
command:
- /bin/bash
- -c
- |
sleep 5 && \
java -jar -Dspring.profiles.active=prd \
-Dmybatis.configuration.log-impl=org.apache.ibatis.logging.nologging.NoLoggingImpl \
-Dspring.datasource.user='${MYSQL_USER}' \
-Dspring.datasource.password='${MYSQL_PASSWORD}' \
-Dspring.datasource.url=jdbc:mysql://${MYSQL_ADDRESS}/qiezi?useUnicode=true\&characterEncoding=utf-8\&useSSL=false\&useJDBCCompliantTimezoneShift=true\&useLegacyDatetimeCode=false\&serverTimezone=UTC \
-Dspring.redis.host=${REDIS_HOST} \
-Dspring.redis.port=${REDIS_PORT} \
service.jar
networks:
qiezi_statistic: