66 lines
1.8 KiB
YAML
66 lines
1.8 KiB
YAML
services:
|
|
mysql:
|
|
image: ${MYSQL_IMAGE:-mysql:8.4}
|
|
restart: unless-stopped
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-coredns_root_dev}
|
|
volumes:
|
|
- ./dev/mysql-init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
|
- mysql-data:/var/lib/mysql
|
|
ports:
|
|
- "127.0.0.1:13306:3306"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "mysqladmin ping --host=127.0.0.1 --user=root --password=\"$$MYSQL_ROOT_PASSWORD\" --silent"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 30
|
|
start_period: 30s
|
|
|
|
coredns:
|
|
image: ${COREDNS_IMAGE:-git.bjphoster.com/docker/coredns-mysql:latest}
|
|
restart: unless-stopped
|
|
command: ["-conf", "/Corefile"]
|
|
environment:
|
|
COREDNS_MYSQL_DSN: "coredns:coredns_dev@tcp(mysql:3306)/coredns"
|
|
volumes:
|
|
- ./dev/Corefile:/Corefile:ro
|
|
ports:
|
|
- "127.0.0.1:10053:53/udp"
|
|
- "127.0.0.1:10053:53/tcp"
|
|
depends_on:
|
|
mysql:
|
|
condition: service_healthy
|
|
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: dockerfile
|
|
restart: unless-stopped
|
|
stop_grace_period: 30s
|
|
environment:
|
|
DB_HOST: mysql
|
|
DB_PORT: "3306"
|
|
DB_USER: ${DB_USER:-coredns_webui}
|
|
DB_PASSWORD: ${DB_PASSWORD:-coredns_webui_dev}
|
|
DB_NAME: ${DB_NAME:-coredns}
|
|
DB_TLS: ${DB_TLS:-false}
|
|
DB_TABLE_PREFIX: ${DB_TABLE_PREFIX:-coredns_}
|
|
DB_WEBUI_NAME:
|
|
DB_WEBUI_TABLE_PREFIX:
|
|
HTTP_ADDR: 0.0.0.0
|
|
HTTP_PORT: "8080"
|
|
LOG_LEVEL: ${LOG_LEVEL:-DEBUG}
|
|
APP_NAME: ${APP_NAME:-CoreDNS Web UI}
|
|
COOKIE_SECURE: ${COOKIE_SECURE:-false}
|
|
SESSION_IDLE_TIMEOUT: ${SESSION_IDLE_TIMEOUT:-1h}
|
|
SESSION_MAX_AGE: ${SESSION_MAX_AGE:-12h}
|
|
TRUSTED_PROXIES: ${TRUSTED_PROXIES:-}
|
|
ports:
|
|
- "127.0.0.1:8080:8080"
|
|
depends_on:
|
|
mysql:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
mysql-data:
|