build: add makefile, dockerfile, ci and development stack
- build: add makefile, dockerfile, ci and development stack - feat(config): add environment configuration and logger - feat(server): add server lifecycle with health and version routes - feat(db): add connection, contract check, migrations and stores - feat(cli): add command dispatch and user management - test(db): add integration tests against mysql
This commit is contained in:
1 parent
45d1e307c6
commit
7089a6f408
46 files changed
+8456
No files matched your search
@@ -0,0 +1,63 @@
|
||||
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_}
|
||||
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:
|
||||
Reference in new issue
Block a user