39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
|
version: "2"
|
||
|
services:
|
||
|
front:
|
||
|
image: nginx
|
||
|
networks:
|
||
|
- bookmark
|
||
|
volumes:
|
||
|
- /etc/localtime:/etc/localtime
|
||
|
- ./config/timezone:/etc/timezone
|
||
|
- ./qiezi_front/dist:/opt/dist
|
||
|
- ./data/nginx/nginx.conf:/etc/nginx/nginx.conf
|
||
|
ports:
|
||
|
- ${NGINX_PORT}:8080
|
||
|
|
||
|
backend:
|
||
|
image: openjdk:11.0
|
||
|
networks:
|
||
|
- bookmark
|
||
|
volumes:
|
||
|
- /etc/localtime:/etc/localtime
|
||
|
- ./config/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-plus.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}/bookmark?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:
|
||
|
bookmark:
|