-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
37 lines (35 loc) · 891 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
services:
api:
container_name: mojolicious
build:
context: ./
dockerfile: Dockerfile
environment:
- PERL5LIB=/opt/mods/local/lib/perl5:/opt/app/t/lib
command: 'morbo -l http://*:5000 -w lib -w etc etc/app.pl'
ports:
- 5000:5000
volumes:
- ./lib:/opt/app/lib
- ./etc:/opt/app/etc
- ./t:/opt/app/t
depends_on:
db:
condition: service_healthy
db:
container_name: mysql
image: mysql:8.0-oracle
restart: always
environment:
TZ: Asia/Tokyo
MYSQL_ROOT_PASSWORD: password
volumes:
- db_data:/var/lib/mysql
- ./db/initdb.d:/docker-entrypoint-initdb.d
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
ports:
- '3306:3306'
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -uroot -ppassword
volumes:
db_data: