-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
99 lines (87 loc) · 2.18 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
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
99
version: "3.3"
services:
postgresql-db:
container_name: postgres-db
image: 'postgres'
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- 5432:5432
# volumes:
# - ./postgres-volume:/var/lib/postgresql/data:z
rabbitmq:
container_name: tithe-rabbitmq
image: 'rabbitmq:management'
restart: always
ports:
- 5672:5672
- 15672:15672
# Local Environment
dev-vue-tithe:
container_name: tithe-vue-dev
image: tithe-vue-dev-image
build: ./Tithe-Vue/
ports:
- 5173:5173
restart: always
depends_on:
- dev-spring-tithe
profiles: ["dev"]
dev-spring-tithe:
container_name: tithe-spring-dev
image: tithe-spring-dev-image
build: ./Tithe-Spring/
ports:
- 8080:8080
restart: always
depends_on:
- postgresql-db
profiles: ["dev"]
# Stage Environment
stage-vue-tithe:
container_name: tithe-vue-stage
image: tithe-vue-stage-image
build: ./Tithe-Vue/
entrypoint: bash -c "npm run build-stage && npm run preview"
ports:
- 4173:4173
restart: always
depends_on:
- stage-spring-tithe
profiles: ["stage"]
stage-spring-tithe:
container_name: tithe-spring-stage
image: tithe-spring-stage-image
build: ./Tithe-Spring/
entrypoint: bash -c "chmod +x ./gradlew && ./gradlew bootRun --args='--spring.profiles.active=stage'"
ports:
- 8080:8080
restart: always
depends_on:
- postgresql-db
profiles: ["stage"]
# Production Environment
prod-vue-tithe:
container_name: tithe-vue-prod
image: tithe-vue-prod-image
build: ./Tithe-Vue/
entrypoint: bash -c "chmod +x ./vue-prod-entrypoint.sh && ./vue-prod-entrypoint.sh"
ports:
- 80:80
restart: always
depends_on:
- prod-spring-tithe
profiles: ["prod"]
prod-spring-tithe:
container_name: tithe-spring-prod
image: tithe-spring-prod-image
build: ./Tithe-Spring/
entrypoint: bash -c "chmod +x ./spring-prod-entrypoint.sh && ./spring-prod-entrypoint.sh"
ports:
- 8080:8080
restart: always
depends_on:
- postgresql-db
profiles: ["prod"]