2018-04-18 03:07:24 +00:00
|
|
|
version: "2.1"
|
2018-04-17 14:21:42 +00:00
|
|
|
|
|
|
|
services:
|
|
|
|
powerdns-admin:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: docker/PowerDNS-Admin/Dockerfile
|
|
|
|
args:
|
|
|
|
- ENVIRONMENT=${ENVIRONMENT}
|
|
|
|
image: powerdns-admin
|
|
|
|
container_name: powerdns-admin
|
|
|
|
mem_limit: 256M
|
|
|
|
memswap_limit: 256M
|
|
|
|
ports:
|
|
|
|
- "9191:9191"
|
|
|
|
volumes:
|
2018-07-06 15:17:01 +00:00
|
|
|
# Code
|
2018-04-17 14:21:42 +00:00
|
|
|
- .:/powerdns-admin/
|
|
|
|
- "./configs/${ENVIRONMENT}.py:/powerdns-admin/config.py"
|
2018-07-06 15:17:01 +00:00
|
|
|
# Assets dir volume
|
|
|
|
- powerdns-admin-assets:/powerdns-admin/app/static
|
|
|
|
- powerdns-admin-assets2:/powerdns-admin/node_modules
|
|
|
|
- powerdns-admin-assets3:/powerdns-admin/logs
|
|
|
|
- ./app/static/custom:/powerdns-admin/app/static/custom
|
2018-04-17 14:21:42 +00:00
|
|
|
logging:
|
|
|
|
driver: json-file
|
|
|
|
options:
|
|
|
|
max-size: 50m
|
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
environment:
|
|
|
|
- ENVIRONMENT=${ENVIRONMENT}
|
|
|
|
- PDA_DB_HOST=${PDA_DB_HOST}
|
|
|
|
- PDA_DB_NAME=${PDA_DB_NAME}
|
|
|
|
- PDA_DB_USER=${PDA_DB_USER}
|
|
|
|
- PDA_DB_PASSWORD=${PDA_DB_PASSWORD}
|
2018-11-06 13:56:55 +00:00
|
|
|
- PDA_DB_PORT=${PDA_DB_PORT}
|
2018-04-17 14:21:42 +00:00
|
|
|
- PDNS_HOST=${PDNS_HOST}
|
|
|
|
- PDNS_API_KEY=${PDNS_API_KEY}
|
2018-06-11 07:12:04 +00:00
|
|
|
- FLASK_APP=/powerdns-admin/app/__init__.py
|
2018-04-17 14:21:42 +00:00
|
|
|
depends_on:
|
2018-04-18 03:07:24 +00:00
|
|
|
powerdns-admin-mysql:
|
|
|
|
condition: service_healthy
|
2018-04-17 14:21:42 +00:00
|
|
|
|
|
|
|
powerdns-admin-mysql:
|
|
|
|
image: mysql/mysql-server:5.7
|
|
|
|
hostname: ${PDA_DB_HOST}
|
|
|
|
container_name: powerdns-admin-mysql
|
|
|
|
mem_limit: 256M
|
|
|
|
memswap_limit: 256M
|
2018-07-06 15:17:01 +00:00
|
|
|
expose:
|
|
|
|
- 3306
|
|
|
|
volumes:
|
|
|
|
- powerdns-admin-mysql-data:/var/lib/mysql
|
2018-04-17 14:21:42 +00:00
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
environment:
|
|
|
|
- MYSQL_DATABASE=${PDA_DB_NAME}
|
|
|
|
- MYSQL_USER=${PDA_DB_USER}
|
|
|
|
- MYSQL_PASSWORD=${PDA_DB_PASSWORD}
|
2018-04-18 03:07:24 +00:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
|
|
|
|
timeout: 10s
|
|
|
|
retries: 5
|
2018-04-17 14:21:42 +00:00
|
|
|
|
|
|
|
pdns-server:
|
|
|
|
image: psitrax/powerdns
|
|
|
|
hostname: ${PDNS_HOST}
|
|
|
|
ports:
|
2019-03-01 22:49:31 +00:00
|
|
|
- "5053:53"
|
|
|
|
- "5053:53/udp"
|
2018-04-17 14:21:42 +00:00
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
command: --api=yes --api-key=${PDNS_API_KEY} --webserver-address=0.0.0.0 --webserver-allow-from=0.0.0.0/0
|
|
|
|
environment:
|
|
|
|
- MYSQL_HOST=${PDNS_DB_HOST}
|
|
|
|
- MYSQL_USER=${PDNS_DB_USER}
|
|
|
|
- MYSQL_PASS=${PDNS_DB_PASSWORD}
|
|
|
|
- PDNS_API_KEY=${PDNS_API_KEY}
|
|
|
|
- PDNS_WEBSERVER_ALLOW_FROM=${PDNS_WEBSERVER_ALLOW_FROM}
|
|
|
|
depends_on:
|
2018-04-18 03:07:24 +00:00
|
|
|
pdns-mysql:
|
|
|
|
condition: service_healthy
|
2018-04-17 14:21:42 +00:00
|
|
|
|
|
|
|
pdns-mysql:
|
|
|
|
image: mysql/mysql-server:5.7
|
|
|
|
hostname: ${PDNS_DB_HOST}
|
|
|
|
container_name: ${PDNS_DB_HOST}
|
|
|
|
mem_limit: 256M
|
|
|
|
memswap_limit: 256M
|
2018-07-06 15:17:01 +00:00
|
|
|
expose:
|
|
|
|
- 3306
|
|
|
|
volumes:
|
|
|
|
- powerdns-mysql-data:/var/lib/mysql
|
2018-04-17 14:21:42 +00:00
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
environment:
|
|
|
|
- MYSQL_DATABASE=${PDNS_DB_NAME}
|
|
|
|
- MYSQL_USER=${PDNS_DB_USER}
|
|
|
|
- MYSQL_PASSWORD=${PDNS_DB_PASSWORD}
|
2018-04-18 03:07:24 +00:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
|
|
|
|
timeout: 10s
|
|
|
|
retries: 5
|
2018-04-17 14:21:42 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
default:
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
powerdns-mysql-data:
|
2018-07-06 15:17:01 +00:00
|
|
|
powerdns-admin-mysql-data:
|
|
|
|
powerdns-admin-assets:
|
|
|
|
powerdns-admin-assets2:
|
|
|
|
powerdns-admin-assets3:
|