forked from elementum-games/shinobi-chronicles
/
docker-compose.yml
37 lines (35 loc) · 984 Bytes
/
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
version: '3'
services:
# Standard Mysql Box, we have to add tricky things else logging by workbench is hard
shinobi-chronicles-db:
image: mysql
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
env_file:
- infra/database.env
ports:
- "3306:3306"
healthcheck:
test: [ "CMD-SHELL", "nc -z 127.0.0.1 3306 || exit 1" ]
interval: 1m30s
timeout: 60s
retries: 6
hostname: shinobi-chronicles-db
# Flyway is best for mysql schema migration history.
database-migration:
image: flyway/flyway
command: migrate
volumes:
- "./db/migrations:/flyway/sql"
- "./flyway.conf:/flyway/conf/flyway.conf"
depends_on:
- shinobi-chronicles-db
# PHP server
server:
build:
dockerfile: infra/server/Dockerfile
context: "."
image: server
ports:
- 80:80
volumes:
- ./:/var/www/html