-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathdocker-compose-test.yml
More file actions
62 lines (55 loc) · 1.75 KB
/
docker-compose-test.yml
File metadata and controls
62 lines (55 loc) · 1.75 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
#
# Copyright (c) 2013-Now https://jeesite.com All rights reserved.
# No deletion without permission, or be held responsible to law.
# @author ThinkGem
#
# 执行 docker-compose up 前,请先编译项目 mvn package
#
name: jeesite-cloud-test
# ==================== Environment ====================
x-common-env: &common-env
TZ: Asia/Shanghai
LANG: C.UTF-8
MYSQL_HOST: jeesite-cloud-mysql
REDIS_HOST: jeesite-cloud-redis
NACOS_HOST: jeesite-cloud-nacos
# ==================== Service Base ====================
x-service-base: &service-base
image: docker.1ms.run/eclipse-temurin:17
environment:
<<: *common-env
JAVA_OPTS: -Dspring.profiles.active=prod -DcustomLogPath=/data
working_dir: /app
command: >
sh -c "if [ ! -d 'web' ]; then mkdir web && cp web.war web && cd web && jar -xvf web.war &&
rm web.war && cd ..; fi && cd web/WEB-INF && exec sh startup.sh"
#restart: unless-stopped
networks:
- jeesite-cloud-network
services:
# ==================== Test1 ====================
jeesite-cloud-test1:
<<: *service-base
container_name: jeesite-cloud-test1
volumes:
- ./.docker/modules:/data
- ./modules/test1/test1/target:/app
# ==================== Test2 ====================
jeesite-cloud-test2:
<<: *service-base
container_name: jeesite-cloud-test2
volumes:
- ./.docker/modules:/data
- ./modules/test2/test2/target:/app
# ==================== Test3 ====================
jeesite-cloud-test3:
<<: *service-base
container_name: jeesite-cloud-test3
volumes:
- ./.docker/modules:/data
- ./modules/test3/test3/target:/app
# ==================== Networks ====================
networks:
jeesite-cloud-network:
name: jeesite-cloud-network
external: true