mirror of
https://github.com/jc21/nginx-proxy-manager.git
synced 2024-08-30 18:22:48 +00:00
commit
ea28da90b2
28
README.md
28
README.md
@ -1,7 +1,7 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://nginxproxymanager.com/github.png">
|
<img src="https://nginxproxymanager.com/github.png">
|
||||||
<br><br>
|
<br><br>
|
||||||
<img src="https://img.shields.io/badge/version-2.7.3-green.svg?style=for-the-badge">
|
<img src="https://img.shields.io/badge/version-2.8.0-green.svg?style=for-the-badge">
|
||||||
<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
|
<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
|
||||||
<img src="https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge">
|
<img src="https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge">
|
||||||
</a>
|
</a>
|
||||||
@ -229,6 +229,32 @@ Special thanks to the following contributors:
|
|||||||
<br /><sub><b>Kyle Harding</b></sub>
|
<br /><sub><b>Kyle Harding</b></sub>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/ahgraber">
|
||||||
|
<img src="https://avatars.githubusercontent.com/u/24922003?s=460&u=8376c9f00af9b6057ba4d2fb03b4f1b20a75277f&v=4" width="80px;" alt=""/>
|
||||||
|
<br /><sub><b>Alex Graber</b></sub>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/MooBaloo">
|
||||||
|
<img src="https://avatars.githubusercontent.com/u/9493496?s=460&v=4" width="80px;" alt=""/>
|
||||||
|
<br /><sub><b>MooBaloo</b></sub>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/Shuro">
|
||||||
|
<img src="https://avatars.githubusercontent.com/u/944030?s=460&v=4" width="80px;" alt=""/>
|
||||||
|
<br /><sub><b>Shuro</b></sub>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/lorisbergeron">
|
||||||
|
<img src="https://avatars.githubusercontent.com/u/51918567?s=460&u=778e4ff284b7d7304450f98421c99f79298371fb&v=4" width="80px;" alt=""/>
|
||||||
|
<br /><sub><b>Loris Bergeron</b></sub>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<!-- markdownlint-enable -->
|
<!-- markdownlint-enable -->
|
||||||
|
@ -6,6 +6,11 @@
|
|||||||
{%- else %}
|
{%- else %}
|
||||||
server {
|
server {
|
||||||
listen 80 default;
|
listen 80 default;
|
||||||
|
{% if ipv6 -%}
|
||||||
|
listen [::]:80;
|
||||||
|
{% else -%}
|
||||||
|
#listen [::]:80;
|
||||||
|
{% endif %}
|
||||||
server_name default-host.localhost;
|
server_name default-host.localhost;
|
||||||
access_log /data/logs/default_host.log combined;
|
access_log /data/logs/default_host.log combined;
|
||||||
{% include "_exploits.conf" %}
|
{% include "_exploits.conf" %}
|
||||||
|
@ -13,6 +13,7 @@ ARG BUILD_DATE
|
|||||||
|
|
||||||
ENV SUPPRESS_NO_CONFIG_WARNING=1
|
ENV SUPPRESS_NO_CONFIG_WARNING=1
|
||||||
ENV S6_FIX_ATTRS_HIDDEN=1
|
ENV S6_FIX_ATTRS_HIDDEN=1
|
||||||
|
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=1
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
RUN echo "fs.file-max = 65535" > /etc/sysctl.conf \
|
RUN echo "fs.file-max = 65535" > /etc/sysctl.conf \
|
||||||
@ -31,7 +32,6 @@ EXPOSE 80
|
|||||||
EXPOSE 81
|
EXPOSE 81
|
||||||
EXPOSE 443
|
EXPOSE 443
|
||||||
|
|
||||||
COPY docker/rootfs /
|
|
||||||
ADD backend /app
|
ADD backend /app
|
||||||
ADD frontend/dist /app/frontend
|
ADD frontend/dist /app/frontend
|
||||||
COPY global /app/global
|
COPY global /app/global
|
||||||
@ -39,10 +39,13 @@ COPY global /app/global
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN yarn install
|
RUN yarn install
|
||||||
|
|
||||||
|
# add late to limit cache-busting by modifications
|
||||||
|
COPY docker/rootfs /
|
||||||
|
|
||||||
# Remove frontend service not required for prod, dev nginx config as well
|
# Remove frontend service not required for prod, dev nginx config as well
|
||||||
RUN rm -rf /etc/services.d/frontend RUN rm -f /etc/nginx/conf.d/dev.conf
|
RUN rm -rf /etc/services.d/frontend RUN rm -f /etc/nginx/conf.d/dev.conf
|
||||||
|
|
||||||
VOLUME [ "/data", "/etc/letsencrypt" ]
|
VOLUME [ "/data", "/etc/letsencrypt" ]
|
||||||
CMD [ "/init" ]
|
ENTRYPOINT [ "/init" ]
|
||||||
|
|
||||||
HEALTHCHECK --interval=5s --timeout=3s CMD /bin/check-health
|
HEALTHCHECK --interval=5s --timeout=3s CMD /bin/check-health
|
||||||
|
@ -27,6 +27,6 @@ EXPOSE 80
|
|||||||
EXPOSE 81
|
EXPOSE 81
|
||||||
EXPOSE 443
|
EXPOSE 443
|
||||||
|
|
||||||
CMD [ "/init" ]
|
ENTRYPOINT [ "/init" ]
|
||||||
|
|
||||||
HEALTHCHECK --interval=5s --timeout=3s CMD /bin/check-health
|
HEALTHCHECK --interval=5s --timeout=3s CMD /bin/check-health
|
1
docker/rootfs/etc/cont-init.d/.gitignore
vendored
1
docker/rootfs/etc/cont-init.d/.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
*
|
*
|
||||||
!.gitignore
|
!.gitignore
|
||||||
|
!*.sh
|
||||||
|
29
docker/rootfs/etc/cont-init.d/01_s6-secret-init.sh
Normal file
29
docker/rootfs/etc/cont-init.d/01_s6-secret-init.sh
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#!/usr/bin/with-contenv bash
|
||||||
|
# ref: https://github.com/linuxserver/docker-baseimage-alpine/blob/master/root/etc/cont-init.d/01-envfile
|
||||||
|
|
||||||
|
# in s6, environmental variables are written as text files for s6 to monitor
|
||||||
|
# seach through full-path filenames for files ending in "__FILE"
|
||||||
|
for FILENAME in $(find /var/run/s6/container_environment/ | grep "__FILE$"); do
|
||||||
|
echo "[secret-init] Evaluating ${FILENAME##*/} ..."
|
||||||
|
|
||||||
|
# set SECRETFILE to the contents of the full-path textfile
|
||||||
|
SECRETFILE=$(cat ${FILENAME})
|
||||||
|
# SECRETFILE=${FILENAME}
|
||||||
|
# echo "[secret-init] Set SECRETFILE to ${SECRETFILE}" # DEBUG - rm for prod!
|
||||||
|
|
||||||
|
# if SECRETFILE exists / is not null
|
||||||
|
if [[ -f ${SECRETFILE} ]]; then
|
||||||
|
# strip the appended "__FILE" from environmental variable name ...
|
||||||
|
STRIPFILE=$(echo ${FILENAME} | sed "s/__FILE//g")
|
||||||
|
# echo "[secret-init] Set STRIPFILE to ${STRIPFILE}" # DEBUG - rm for prod!
|
||||||
|
|
||||||
|
# ... and set value to contents of secretfile
|
||||||
|
# since s6 uses text files, this is effectively "export ..."
|
||||||
|
printf $(cat ${SECRETFILE}) > ${STRIPFILE}
|
||||||
|
# echo "[secret-init] Set ${STRIPFILE##*/} to $(cat ${STRIPFILE})" # DEBUG - rm for prod!"
|
||||||
|
echo "[secret-init] Success! ${STRIPFILE##*/} set from ${FILENAME##*/}"
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "[secret-init] cannot find secret in ${FILENAME}"
|
||||||
|
fi
|
||||||
|
done
|
@ -69,6 +69,9 @@ http {
|
|||||||
real_ip_header X-Real-IP;
|
real_ip_header X-Real-IP;
|
||||||
real_ip_recursive on;
|
real_ip_recursive on;
|
||||||
|
|
||||||
|
# Custom
|
||||||
|
include /data/nginx/custom/http_top[.]conf;
|
||||||
|
|
||||||
# Files generated by NPM
|
# Files generated by NPM
|
||||||
include /etc/nginx/conf.d/*.conf;
|
include /etc/nginx/conf.d/*.conf;
|
||||||
include /data/nginx/default_host/*.conf;
|
include /data/nginx/default_host/*.conf;
|
||||||
|
@ -66,7 +66,7 @@ services:
|
|||||||
- ./data:/data
|
- ./data:/data
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
db:
|
db:
|
||||||
image: 'jc21/mariadb-aria:10.4'
|
image: 'jc21/mariadb-aria:latest'
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: 'npm'
|
MYSQL_ROOT_PASSWORD: 'npm'
|
||||||
MYSQL_DATABASE: 'npm'
|
MYSQL_DATABASE: 'npm'
|
||||||
|
@ -1,5 +1,66 @@
|
|||||||
# Advanced Configuration
|
# Advanced Configuration
|
||||||
|
|
||||||
|
## Docker Secrets
|
||||||
|
|
||||||
|
This image supports the use of Docker secrets to import from file and keep sensitive usernames or passwords from being passed or preserved in plaintext.
|
||||||
|
|
||||||
|
You can set any environment variable from a file by appending `__FILE` (double-underscore FILE) to the environmental variable name.
|
||||||
|
|
||||||
|
```yml
|
||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
# Secrets are single-line text files where the sole content is the secret
|
||||||
|
# Paths in this example assume that secrets are kept in local folder called ".secrets"
|
||||||
|
DB_ROOT_PWD:
|
||||||
|
file: .secrets/db_root_pwd.txt
|
||||||
|
MYSQL_PWD:
|
||||||
|
file: .secrets/mysql_pwd.txt
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: 'jc21/nginx-proxy-manager:latest'
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
# Public HTTP Port:
|
||||||
|
- '80:80'
|
||||||
|
# Public HTTPS Port:
|
||||||
|
- '443:443'
|
||||||
|
# Admin Web Port:
|
||||||
|
- '81:81'
|
||||||
|
environment:
|
||||||
|
# These are the settings to access your db
|
||||||
|
DB_MYSQL_HOST: "db"
|
||||||
|
DB_MYSQL_PORT: 3306
|
||||||
|
DB_MYSQL_USER: "npm"
|
||||||
|
# DB_MYSQL_PASSWORD: "npm" # use secret instead
|
||||||
|
DB_MYSQL_PASSWORD__FILE: /run/secrets/MYSQL_PWD
|
||||||
|
DB_MYSQL_NAME: "npm"
|
||||||
|
# If you would rather use Sqlite uncomment this
|
||||||
|
# and remove all DB_MYSQL_* lines above
|
||||||
|
# DB_SQLITE_FILE: "/data/database.sqlite"
|
||||||
|
# Uncomment this if IPv6 is not enabled on your host
|
||||||
|
# DISABLE_IPV6: 'true'
|
||||||
|
volumes:
|
||||||
|
- ./data:/data
|
||||||
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
db:
|
||||||
|
image: jc21/mariadb-aria
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
# MYSQL_ROOT_PASSWORD: "npm" # use secret instead
|
||||||
|
MYSQL_ROOT_PASSWORD__FILE: /run/secrets/DB_ROOT_PWD
|
||||||
|
MYSQL_DATABASE: "npm"
|
||||||
|
MYSQL_USER: "npm"
|
||||||
|
# MYSQL_PASSWORD: "npm" # use secret instead
|
||||||
|
MYSQL_PASSWORD__FILE: /run/secrets/MYSQL_PWD
|
||||||
|
volumes:
|
||||||
|
- ./data/mysql:/var/lib/mysql
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Disabling IPv6
|
## Disabling IPv6
|
||||||
|
|
||||||
On some docker hosts IPv6 may not be enabled. In these cases, the following message may be seen in the log:
|
On some docker hosts IPv6 may not be enabled. In these cases, the following message may be seen in the log:
|
||||||
|
@ -51,7 +51,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
db:
|
db:
|
||||||
image: jc21/mariadb-aria:10.4
|
image: 'jc21/mariadb-aria:latest'
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: 'npm'
|
MYSQL_ROOT_PASSWORD: 'npm'
|
||||||
|
@ -291,4 +291,15 @@ aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`,
|
|||||||
credentials: 'certbot_dns_vultr:dns_vultr_key = YOUR_VULTR_API_KEY',
|
credentials: 'certbot_dns_vultr:dns_vultr_key = YOUR_VULTR_API_KEY',
|
||||||
full_plugin_name: 'certbot-dns-vultr:dns-vultr',
|
full_plugin_name: 'certbot-dns-vultr:dns-vultr',
|
||||||
},
|
},
|
||||||
|
//####################################################//
|
||||||
|
eurodns: {
|
||||||
|
display_name: 'EuroDNS',
|
||||||
|
package_name: 'certbot-dns-eurodns',
|
||||||
|
package_version: '0.0.4',
|
||||||
|
dependencies: '',
|
||||||
|
credentials: `dns_eurodns_applicationId = myuser
|
||||||
|
dns_eurodns_apiKey = mysecretpassword
|
||||||
|
dns_eurodns_endpoint = https://rest-api.eurodns.com/user-api-gateway/proxy`,
|
||||||
|
full_plugin_name: 'certbot-dns-eurodns:dns-eurodns',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user