-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathdocker-compose-test.yaml
74 lines (71 loc) · 1.94 KB
/
docker-compose-test.yaml
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
version: "3"
services:
mysql:
build:
context: .
dockerfile: Dockerfile-mysql
restart: always
#container_name: mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: user
MYSQL_PASSWORD: password
ports:
- "3306:3306"
healthcheck:
# set myusername and mypassword to desired username and password
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-proot"]
interval: 20s
timeout: 30s
retries: 100
# security_opt:
# - seccomp:unconfined
# volumes:
# - ./inittest.sql:/docker-entrypoint-initdb.d/inittest.sql
user-service:
build:
context: user-service/
dockerfile: Dockerfile
args:
JAR_FILE: user-service/target/*.jar
CACHEBUST: ${CI_COMMIT_SHA} # Use a unique value to bust the cache
image: user-service
environment:
- "SPRING_PROFILES_ACTIVE=test"
#container_name: user-service-container
restart: always
ports:
- "8080:8080"
depends_on:
mysql:
condition: service_healthy
market-service:
build:
context: market-service/
dockerfile: Dockerfile
args:
JAR_FILE: market-service/target/*.jar
CACHEBUST: ${CI_COMMIT_SHA} # Use a unique value to bust the cache
image: market-service
#container_name: market-service-container
restart: always
ports:
- "8081:8081" # Adjust the port as needed
depends_on:
mysql:
condition: service_healthy
fetching-service:
build:
context: fetching-service/
dockerfile: Dockerfile
args:
JAR_FILE: market-service/target/*.jar
CACHEBUST: ${CI_COMMIT_SHA} # Use a unique value to bust the cache
image: fetching-service
#container_name: market-service-container
restart: always
ports:
- "8082:8082" # Adjust the port as needed
depends_on:
mysql:
condition: service_healthy