Skip to content

Commit

Permalink
docker-compose分割
Browse files Browse the repository at this point in the history
  • Loading branch information
tukeJonny committed Oct 30, 2023
1 parent 1f142a9 commit dbd5408
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 54 deletions.
54 changes: 54 additions & 0 deletions development/docker-compose-common.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
version: '3.0'

services:
nginx:
image: nginx:latest
container_name: nginx
volumes:
- ./etc/nginx/conf.d:/etc/nginx/conf.d
ports:
- 127.0.0.1:8443:80
depends_on:
- webapp
mysql:
image: mysql/mysql-server:8.0.31
container_name: mysql
environment:
- "MYSQL_ROOT_HOST=%"
- "MYSQL_ROOT_PASSWORD=root"
volumes:
- ../webapp/sql/initdb.d:/docker-entrypoint-initdb.d
- mysql_volume:/var/lib/mysql
ports:
- "127.0.0.1:3306:3306"
restart: always
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -uisucon -pisucon
interval: 1s
timeout: 3s
retries: 40
start_period: 10s

powerdns:
image: powerdns/pdns-auth-master
container_name: powerdns
environment:
- "PDNS_AUTH_API_KEY=isudns"
ports:
- "127.0.0.1:1053:53"
- "127.0.0.1:1053:53/udp"
- "127.0.0.1:8081:8081"
volumes:
- powerdns_volume:/var/lib/powerdns
# NOTE: gsqlite3バックエンドを読み込もうとするので、これを上書きしてしまう
# https://github.com/PowerDNS/pdns/blob/8cbe7d8e3c44f87b986a6f88cda98c3a0d943026/Dockerfile-auth#L88
# https://github.com/PowerDNS/pdns/blob/8cbe7d8e3c44f87b986a6f88cda98c3a0d943026/dockerdata/pdns.conf#L3
- ../webapp/powerdns/pdns.conf:/etc/powerdns/pdns.conf:ro
restart: always
depends_on:
mysql:
condition: service_healthy

volumes:
mysql_volume:
powerdns_volume:
54 changes: 0 additions & 54 deletions development/docker-compose-go.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,6 @@
version: '3.0'

# FIXME: webappコンテナの起動

services:
nginx:
image: nginx:latest
container_name: nginx
volumes:
- ./etc/nginx/conf.d:/etc/nginx/conf.d
ports:
- 127.0.0.1:8443:80
depends_on:
- webapp
mysql:
image: mysql/mysql-server:8.0.31
container_name: mysql
environment:
- "MYSQL_ROOT_HOST=%"
- "MYSQL_ROOT_PASSWORD=root"
volumes:
- ../webapp/sql/initdb.d:/docker-entrypoint-initdb.d
- mysql_volume:/var/lib/mysql
ports:
- "127.0.0.1:3306:3306"
restart: always
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -uisucon -pisucon
interval: 1s
timeout: 3s
retries: 40
start_period: 10s

powerdns:
image: powerdns/pdns-auth-master
container_name: powerdns
environment:
- "PDNS_AUTH_API_KEY=isudns"
ports:
- "127.0.0.1:1053:53"
- "127.0.0.1:1053:53/udp"
- "127.0.0.1:8081:8081"
volumes:
- powerdns_volume:/var/lib/powerdns
# NOTE: gsqlite3バックエンドを読み込もうとするので、これを上書きしてしまう
# https://github.com/PowerDNS/pdns/blob/8cbe7d8e3c44f87b986a6f88cda98c3a0d943026/Dockerfile-auth#L88
# https://github.com/PowerDNS/pdns/blob/8cbe7d8e3c44f87b986a6f88cda98c3a0d943026/dockerdata/pdns.conf#L3
- ../webapp/powerdns/pdns.conf:/etc/powerdns/pdns.conf:ro
restart: always
depends_on:
mysql:
condition: service_healthy

webapp:
build:
context: ../webapp/go
Expand All @@ -76,7 +26,3 @@ services:
depends_on:
mysql:
condition: service_healthy

volumes:
mysql_volume:
powerdns_volume:

0 comments on commit dbd5408

Please sign in to comment.