first code commit

This commit is contained in:
Bryan Joshua Pedini 2022-03-14 18:51:25 +01:00
parent e217130d13
commit 0f57eccf69
3 changed files with 52 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/.env

36
docker-compose.yml Normal file
View File

@ -0,0 +1,36 @@
version: "3"
services:
pda:
image: ngoduykhanh/powerdns-admin:${PDA_VERSION}
restart: always
environment:
- SQLALCHEMY_DATABASE_URI=mysql://${MYSQL_USER}:${MYSQL_PASS}@host.docker.internal/${MYSQL_DBNAME}
- GUNICORN_TIMEOUT=60
- GUNICORN_WORKERS=2
- GUNICORN_LOGLEVEL=INFO
- OFFLINE_MODE=False
labels:
- traefik.enable=${TRAEFIK_ENABLED}
- traefik.docker.network=traefik
### Section HTTP
- traefik.http.routers.http-${TRAEFIK_ROUTER}.entrypoints=http
# redirect to HTTPS only
- traefik.http.routers.http-${TRAEFIK_ROUTER}.middlewares=http-to-https
- traefik.http.routers.http-${TRAEFIK_ROUTER}.rule=Host(`${TRAEFIK_MATCHRULE}`)
### Section HTTPS
- traefik.http.routers.https-${TRAEFIK_ROUTER}.entrypoints=https
# configure the exposed service
- traefik.http.routers.https-${TRAEFIK_ROUTER}.rule=Host(`${TRAEFIK_MATCHRULE}`)
# of course, enable TLS and it's certificate provider
- traefik.http.routers.https-${TRAEFIK_ROUTER}.tls=${TRAEFIK_TLSENABLED}
- traefik.http.routers.https-${TRAEFIK_ROUTER}.tls.certresolver=${TRAEFIK_CERTRESOLVER}
# specify a service so a custom port can be used
- traefik.http.services.${TRAEFIK_SERVICE}.loadbalancer.server.port=${TRAEFIK_SERVICE_PORT}
networks:
- traefik
networks:
traefik:
external: true
name: ${TRAEFIK_NETWORK}

15
example.env Normal file
View File

@ -0,0 +1,15 @@
# PowerDNS-Admin
PDA_VERSION==0.2.4
MYSQL_DBNAME=pdns
MYSQL_USER=pdns
MYSQL_PASS=changeme
# Træfik
TRAEFIK_CERTRESOLVER=letsencrypt
TRAEFIK_ENABLED=true
TRAEFIK_MATCHRULE=pda.mydomain.com
TRAEFIK_NETWORK=traefik
TRAEFIK_ROUTER=pda_mydomain_com
TRAEFIK_SERVICE=pda_mydomain_com
TRAEFIK_SERVICE_PORT=80
TRAEFIK_TLSENABLED=true