-
Notifications
You must be signed in to change notification settings - Fork 16
/
compose.yaml
44 lines (40 loc) · 944 Bytes
/
compose.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
version: '3.9'
services:
database:
image: mysql:8.0
restart: unless-stopped
env_file: .env
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost", "-u", "root", "-p$$MYSQL_ROOT_PASSWORD" ]
timeout: 20s
retries: 10
ports:
- "3306:3306"
volumes:
- db-data:/var/lib/db
networks:
- spring-network
phpmyadmin:
depends_on:
database:
condition: service_healthy
image: phpmyadmin/phpmyadmin
restart: unless-stopped
ports:
- "8081:80"
env_file: .env
environment:
PMA_HOST: database
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
networks:
- spring-network
volumes:
db-data: {}
networks:
spring-network:
driver: bridge