mirror of
https://github.com/pschiffe/docker-pdns.git
synced 2024-11-13 03:47:56 +01:00
Allow configuration of uwsgi host and port in static image
via env vars `PDNS_ADMIN_STATIC_UWSGI_HOST` and `PDNS_ADMIN_STATIC_UWSGI_PORT` Fixes #27
This commit is contained in:
parent
5427e1e1fc
commit
0a615b25ca
3 changed files with 11 additions and 2 deletions
|
@ -4,8 +4,10 @@ RUN dnf -y --setopt=install_weak_deps=False install \
|
|||
nginx \
|
||||
&& dnf clean all
|
||||
|
||||
COPY pdns-nginx.conf.tpl docker-entrypoint.sh /
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
COPY pdns-nginx.conf /etc/nginx/nginx.conf
|
||||
ENTRYPOINT [ "/docker-entrypoint.sh" ]
|
||||
|
||||
CMD [ "/usr/sbin/nginx", "-g", "daemon off;" ]
|
||||
|
|
7
pdns-admin-static-ngoduykhanh/docker-entrypoint.sh
Executable file
7
pdns-admin-static-ngoduykhanh/docker-entrypoint.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
subvars --prefix 'PDNS_ADMIN_STATIC_' < /pdns-nginx.conf.tpl > /etc/nginx/nginx.conf
|
||||
|
||||
exec "$@"
|
|
@ -45,7 +45,7 @@ http {
|
|||
|
||||
location @pdns_admin {
|
||||
include uwsgi_params;
|
||||
uwsgi_pass pdns-admin-uwsgi:9494;
|
||||
uwsgi_pass {{ .PDNS_ADMIN_STATIC_UWSGI_HOST | default "pdns-admin-uwsgi" }}:{{ .PDNS_ADMIN_STATIC_UWSGI_PORT | default 9494 }};
|
||||
}
|
||||
|
||||
error_page 404 /404.html;
|
Loading…
Reference in a new issue