-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
95 lines (86 loc) · 2.22 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
version: '3.8'
services:
# mindswap-mysql:
# image: mysql:8.0
# container_name: mindswap-mysql
# ports:
# - '3306:3306'
# environment:
# MYSQL_ROOT_PASSWORD: 'mypass'
# MYSQL_DATABASE: 'urlcompress'
# restart: always
# networks:
# - mindswap-net
# mindswap-app:
# image: url_service
# container_name: mindswap-app
# depends_on:
# - mindswap-mysql
# ports:
# - '8080:8080'
# environment:
# MYSQL_DATABASE: 'urlcompress'
# MYSQL_USER: 'root'
# MYSQL_ROOT_PASSWORD: 'mypass'
# MYSQL_URL: jdbc:mysql://mindswap-mysql:3306/urlcompress
# SERVER_PORT: '8080'
# HIBERNATE_DDL_AUTO: 'create-drop'
# SPRING_PROFILES_ACTIVE: 'docker'
# networks:
# - mindswap-net
#
# mindswap-app-2:
# image: url_service
# container_name: mindswap-app-2
# depends_on:
# - mindswap-mysql
# ports:
# - '8081:8080'
# environment:
# MYSQL_DATABASE: 'urlcompress'
# MYSQL_USER: 'root'
# MYSQL_ROOT_PASSWORD: 'mypass'
# MYSQL_URL: jdbc:mysql://mindswap-mysql:3306/urlcompress
# SERVER_PORT: '8080'
# HIBERNATE_DDL_AUTO: 'create-drop'
# SPRING_PROFILES_ACTIVE: 'docker'
# networks:
# - mindswap-net
mindswap-app-mariadb:
image: url_service
container_name: mindswap-app-3
depends_on:
mindswap-mariadb:
condition: service_healthy
ports:
- '8082:8080'
environment:
SPRING_DATA_SOURCE: org.mariadb.jdbc.Driver
MARIADB_DB: 'urlcompress'
MARIADB_USER: 'root'
MARIADB_PASSWORD: 'mypass'
DATABASE_URL: jdbc:mariadb://mindswap-mariadb:3306/urlcompress
SERVER_PORT: '8080'
HIBERNATE_DDL_AUTO: 'update'
SPRING_PROFILES_ACTIVE: 'docker'
networks:
- mindswap-net
mindswap-mariadb:
image: mariadb:latest
container_name: mindswap-mariadb
ports:
- '3307:3306'
healthcheck:
test: "/usr/bin/mysql --user=root --password=mypass --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 10
environment:
MARIADB_ROOT_PASSWORD: 'mypass'
MARIADB_DATABASE: 'urlcompress'
restart: always
networks:
- mindswap-net
networks:
mindswap-net:
driver: bridge