-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild-docker-compose.yml
More file actions
46 lines (43 loc) · 1.42 KB
/
build-docker-compose.yml
File metadata and controls
46 lines (43 loc) · 1.42 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
version: "3.9"
services:
db:
image: mariadb:latest
restart: on-failure
environment:
MYSQL_DATABASE: 'ljprojectbuilder'
# So you don't have to use root, but you can if you like
MYSQL_USER: 'ljprojectbuilder'
# You can use whatever password you like
MYSQL_PASSWORD: 'ljprojectbuilder'
# Password for root access
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
healthcheck:
test: ["CMD", "mysql" ,"-h", "localhost", "-P", "3306", "-u", "root", "-e", "select 1", "ljprojectbuilder"]
interval: 5s
timeout: 60s
retries: 30
volumes:
- db-data:/var/lib/mysql
networks: # Networks to join (Services on the same network can communicate with each other using their name)
- backend
lj-projectbuilder:
build: .
depends_on:
db:
condition: service_healthy
restart: on-failure
ports:
- 8081:8081
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://db:3306/ljprojectbuilder?useSSL=false&serverTimezone=UTC&useLegacyDatetimeCode=false
SPRING_DATASOURCE_USERNAME: ljprojectbuilder
SPRING_DATASOURCE_PASSWORD: ljprojectbuilder
SPRING_PROFILE_ACTIVE: dev
networks: # Networks to join (Services on the same network can communicate with each other using their name)
- backend
# Names our volume
volumes:
db-data:
# Networks to be created to facilitate communication between containers
networks:
backend: