-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
59 lines (55 loc) · 1.23 KB
/
Copy pathcompose.yml
File metadata and controls
59 lines (55 loc) · 1.23 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
services:
spring-app:
build:
dockerfile: Dockerfile
ports:
- "8080:8080"
env_file:
- .env
environment:
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
- DB_NAME=${DB_NAME}
- DB_USERNAME=${DB_USERNAME}
- DB_PASSWORD=${DB_PASSWORD}
depends_on:
database:
required: true
condition: service_healthy
email:
required: true
condition: service_healthy
database:
image: mariadb:10.6
ports:
- "3306:3306"
environment:
- MARIADB_ROOT_PASSWORD=secret
- MARIADB_DATABASE=${DB_NAME}
- MARIADB_USER=${DB_USERNAME}
- MARIADB_PASSWORD=${DB_PASSWORD}
volumes:
- database_data:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
start_period: 5s
interval: 5s
timeout: 5s
retries: 3
email:
image: mailhog/mailhog:v1.0.1
ports:
- "1025:1025" # SMTP
- "8025:8025" # WebUI
healthcheck:
test: ["CMD", "wget", "http://localhost:8025"]
start_period: 3s
interval: 5s
timeout: 5s
retries: 3
networks:
default:
name: study-buddy-network
volumes:
database_data:
driver: local