This repository was archived by the owner on Jul 20, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (55 loc) · 1.33 KB
/
Copy pathdocker-compose.yml
File metadata and controls
59 lines (55 loc) · 1.33 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:
mysql:
image: mysql:8.0
restart: always
env_file:
- .env
ports:
- "${DOCKER_PORT_MYSQL:-3306}:3306"
volumes:
- mysql_data:/var/lib/mysql
#- ./db/init:/docker-entrypoint-initdb.d
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${MYSQL_ROOT_PASSWORD}" ]
timeout: 20s
retries: 10
interval: 5s
start_period: 30s
php:
build: ./php
restart: always
ports:
- "${DOCKER_PORT_PHP:-8080}:80"
volumes:
- ./src:/var/www/html
env_file:
- .env
depends_on:
mysql:
condition: service_healthy
phpmyadmin:
image: phpmyadmin/phpmyadmin
restart: always
ports:
- "${DOCKER_PORT_PMA:-8081}:80"
environment:
PMA_HOST: mysql
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
depends_on:
mysql:
condition: service_healthy
flyway:
image: flyway/flyway:latest
restart: no
environment:
FLYWAY_URL: jdbc:mysql://${MYSQL_HOST}:${MYSQL_PORT}/${MYSQL_DATABASE}?allowPublicKeyRetrieval=true&useSSL=false
FLYWAY_USER: ${MYSQL_USER}
FLYWAY_PASSWORD: ${MYSQL_PASSWORD}
command: migrate
volumes:
- ./db/migrations:/flyway/sql
depends_on:
mysql:
condition: service_healthy
volumes:
mysql_data: