mirror of
https://github.com/pschiffe/docker-pdns.git
synced 2024-09-21 07:05:00 +02:00
Add base image for ngoduykhanh version of pdns admin
This commit is contained in:
parent
fb43c06bf1
commit
52a425c3a5
2 changed files with 50 additions and 0 deletions
36
pdns-admin-base-ngoduykhanh/Dockerfile
Normal file
36
pdns-admin-base-ngoduykhanh/Dockerfile
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
FROM fedora:29
|
||||||
|
MAINTAINER "Peter Schiffer" <peter@rfv.sk>
|
||||||
|
|
||||||
|
RUN curl -sSL -o /etc/yum.repos.d/yarn.repo https://dl.yarnpkg.com/rpm/yarn.repo
|
||||||
|
|
||||||
|
RUN dnf -y --setopt=install_weak_deps=False install \
|
||||||
|
python3-ldap \
|
||||||
|
python3-mysql \
|
||||||
|
python3-xmlsec \
|
||||||
|
uwsgi \
|
||||||
|
yarn \
|
||||||
|
&& dnf clean all
|
||||||
|
|
||||||
|
RUN mkdir -p /opt/powerdns-admin \
|
||||||
|
&& curl -sSL https://github.com/ngoduykhanh/PowerDNS-Admin/archive/master.tar.gz \
|
||||||
|
| tar -xzC /opt/powerdns-admin --strip 1 \
|
||||||
|
&& sed -i '/python-ldap/d' /opt/powerdns-admin/requirements.txt \
|
||||||
|
&& chown -R root: /opt/powerdns-admin \
|
||||||
|
&& chown -R uwsgi: /opt/powerdns-admin/upload
|
||||||
|
|
||||||
|
WORKDIR /opt/powerdns-admin
|
||||||
|
|
||||||
|
RUN pip3 install --no-cache-dir envtpl python-dotenv \
|
||||||
|
&& pip3 install -r requirements.txt --no-cache-dir
|
||||||
|
|
||||||
|
ENV PDNS_ADMIN_LOG_LEVEL="'INFO'" \
|
||||||
|
PDNS_ADMIN_SAML_ENABLED=False
|
||||||
|
|
||||||
|
COPY config.py.tpl /
|
||||||
|
|
||||||
|
RUN envtpl < /config.py.tpl > /opt/powerdns-admin/config.py \
|
||||||
|
&& sed -i '/SQLALCHEMY_DATABASE_URI/d' /opt/powerdns-admin/config.py
|
||||||
|
|
||||||
|
RUN yarn install --pure-lockfile \
|
||||||
|
&& flask assets build \
|
||||||
|
&& chown -R uwsgi: /opt/powerdns-admin/app/static/.webassets-cache
|
14
pdns-admin-base-ngoduykhanh/config.py.tpl
Normal file
14
pdns-admin-base-ngoduykhanh/config.py.tpl
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import os
|
||||||
|
basedir = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
||||||
|
{% for key, value in environment('PDNS_ADMIN_') %}{{ key }} = {{ value }}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
WTF_CSRF_ENABLED = True
|
||||||
|
BIND_ADDRESS = '0.0.0.0'
|
||||||
|
PORT = 9393
|
||||||
|
LOG_FILE = ''
|
||||||
|
UPLOAD_DIR = '/opt/powerdns-admin/upload'
|
||||||
|
SQLALCHEMY_DATABASE_URI = 'mysql://' + SQLA_DB_USER + ':' + SQLA_DB_PASSWORD + '@' + SQLA_DB_HOST + ':' + SQLA_DB_PORT + '/' + SQLA_DB_NAME
|
||||||
|
SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository')
|
||||||
|
SQLALCHEMY_TRACK_MODIFICATIONS = True
|
Loading…
Reference in a new issue