version: "2.1" services: powerdns-admin: build: context: . dockerfile: docker/PowerDNS-Admin/Dockerfile args: - ENVIRONMENT=development image: powerdns-admin container_name: powerdns-admin mem_limit: 256M restart: always memswap_limit: 256M ports: - "9191:9191" labels: - "traefik.frontend.rule=Host:dns.chaospott.de" - "traefik.port=9191" - "traefik.frontend.passHostHeader=true" volumes: # Code - ".:/powerdns-admin/" - "./configs/development.py:/powerdns-admin/config.py" # 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 logging: driver: json-file options: max-size: 50m networks: - default environment: - ENVIRONMENT=development - PDA_DB_HOST=powerdns-admin-mysql - PDA_DB_NAME=powerdns_admin - PDA_DB_USER=powerdns_admin - PDA_DB_PASSWORD={{ db_password }} - PDA_DB_PORT=3306 - PDNS_HOST=192.168.122.1 - PDNS_API_KEY={{ api_key }} - FLASK_APP=/powerdns-admin/app/__init__.py depends_on: powerdns-admin-mysql: condition: service_healthy powerdns-admin-mysql: image: mysql/mysql-server:5.7 hostname: ${PDA_DB_HOST} container_name: powerdns-admin-mysql mem_limit: 256M memswap_limit: 256M restart: always expose: - 3306 volumes: - /data/powerdns:/var/lib/mysql labels: - "traefik.enable=false" environment: - MYSQL_DATABASE=powerdns_admin - MYSQL_USER=powerdns_admin - MYSQL_PASSWORD={{ db_password }} healthcheck: test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"] timeout: 10s retries: 5 networks: default: external: name: web volumes: powerdns-admin-assets: powerdns-admin-assets2: powerdns-admin-assets3: