-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcompose-perl.yml
46 lines (46 loc) · 1.25 KB
/
compose-perl.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
38
39
40
41
42
43
44
45
46
services:
nginx:
image: public.ecr.aws/docker/library/nginx:latest
container_name: nginx
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d:ro
- ../frontend/build/client:/home/isucon/webapp/public:ro
ports:
- "8080:80"
depends_on:
- webapp
webapp:
build:
context: ../webapp/perl
dockerfile: ../../development/dockerfiles/Dockerfile.perl
expose:
- 8080
volumes:
- ../webapp/sql:/home/isucon/webapp/sql
working_dir: /home/isucon/webapp/perl
depends_on:
db:
condition: service_healthy
environment:
ISUCON_DB_HOST: db
MOJO_MODE: deployment
PLACK_ENV: deployment
extra_hosts:
- "host.docker.internal:host-gateway"
db:
image: public.ecr.aws/docker/library/mysql:8
environment:
ENV: local-dev
MYSQL_ROOT_PASSWORD: isucon
MYSQL_DATABASE: isucon
ports:
- 3306:3306
volumes:
- ./mysql/db:/var/lib/mysql
- ../webapp/sql:/docker-entrypoint-initdb.d
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -uisucon -pisucon
start_period: 60s
matcher:
image: mirror.gcr.io/curlimages/curl:latest
command: /bin/sh -c "while true; do curl -s http://nginx/api/internal/matching; sleep 0.5; done"