Skip to content

Commit ea28da9

Browse files
authored
Merge pull request #876 from jc21/develop
v2.8.0
2 parents 8cb44c7 + b243324 commit ea28da9

File tree

12 files changed

+147
-8
lines changed

12 files changed

+147
-8
lines changed

.version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.3
1+
2.8.0

README.md

+27-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<p align="center">
22
<img src="https://nginxproxymanager.com/github.png">
33
<br><br>
4-
<img src="https://img.shields.io/badge/version-2.7.3-green.svg?style=for-the-badge">
4+
<img src="https://img.shields.io/badge/version-2.8.0-green.svg?style=for-the-badge">
55
<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
66
<img src="https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge">
77
</a>
@@ -229,6 +229,32 @@ Special thanks to the following contributors:
229229
<br /><sub><b>Kyle Harding</b></sub>
230230
</a>
231231
</td>
232+
<td align="center">
233+
<a href="https://github.com/ahgraber">
234+
<img src="https://avatars.githubusercontent.com/u/24922003?s=460&u=8376c9f00af9b6057ba4d2fb03b4f1b20a75277f&v=4" width="80px;" alt=""/>
235+
<br /><sub><b>Alex Graber</b></sub>
236+
</a>
237+
</td>
238+
</tr>
239+
<tr>
240+
<td align="center">
241+
<a href="https://github.com/MooBaloo">
242+
<img src="https://avatars.githubusercontent.com/u/9493496?s=460&v=4" width="80px;" alt=""/>
243+
<br /><sub><b>MooBaloo</b></sub>
244+
</a>
245+
</td>
246+
<td align="center">
247+
<a href="https://github.com/Shuro">
248+
<img src="https://avatars.githubusercontent.com/u/944030?s=460&v=4" width="80px;" alt=""/>
249+
<br /><sub><b>Shuro</b></sub>
250+
</a>
251+
</td>
252+
<td align="center">
253+
<a href="https://github.com/lorisbergeron">
254+
<img src="https://avatars.githubusercontent.com/u/51918567?s=460&u=778e4ff284b7d7304450f98421c99f79298371fb&v=4" width="80px;" alt=""/>
255+
<br /><sub><b>Loris Bergeron</b></sub>
256+
</a>
257+
</td>
232258
</tr>
233259
</table>
234260
<!-- markdownlint-enable -->

backend/templates/default.conf

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
{%- else %}
77
server {
88
listen 80 default;
9+
{% if ipv6 -%}
10+
listen [::]:80;
11+
{% else -%}
12+
#listen [::]:80;
13+
{% endif %}
914
server_name default-host.localhost;
1015
access_log /data/logs/default_host.log combined;
1116
{% include "_exploits.conf" %}

docker/Dockerfile

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ ARG BUILD_DATE
1313

1414
ENV SUPPRESS_NO_CONFIG_WARNING=1
1515
ENV S6_FIX_ATTRS_HIDDEN=1
16+
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=1
1617
ENV NODE_ENV=production
1718

1819
RUN echo "fs.file-max = 65535" > /etc/sysctl.conf \
@@ -31,18 +32,20 @@ EXPOSE 80
3132
EXPOSE 81
3233
EXPOSE 443
3334

34-
COPY docker/rootfs /
3535
ADD backend /app
3636
ADD frontend/dist /app/frontend
3737
COPY global /app/global
3838

3939
WORKDIR /app
4040
RUN yarn install
4141

42+
# add late to limit cache-busting by modifications
43+
COPY docker/rootfs /
44+
4245
# Remove frontend service not required for prod, dev nginx config as well
4346
RUN rm -rf /etc/services.d/frontend RUN rm -f /etc/nginx/conf.d/dev.conf
4447

4548
VOLUME [ "/data", "/etc/letsencrypt" ]
46-
CMD [ "/init" ]
49+
ENTRYPOINT [ "/init" ]
4750

4851
HEALTHCHECK --interval=5s --timeout=3s CMD /bin/check-health

docker/dev/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ EXPOSE 80
2727
EXPOSE 81
2828
EXPOSE 443
2929

30-
CMD [ "/init" ]
30+
ENTRYPOINT [ "/init" ]
3131

32-
HEALTHCHECK --interval=5s --timeout=3s CMD /bin/check-health
32+
HEALTHCHECK --interval=5s --timeout=3s CMD /bin/check-health
+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*
22
!.gitignore
3+
!*.sh
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/with-contenv bash
2+
# ref: https://github.com/linuxserver/docker-baseimage-alpine/blob/master/root/etc/cont-init.d/01-envfile
3+
4+
# in s6, environmental variables are written as text files for s6 to monitor
5+
# seach through full-path filenames for files ending in "__FILE"
6+
for FILENAME in $(find /var/run/s6/container_environment/ | grep "__FILE$"); do
7+
echo "[secret-init] Evaluating ${FILENAME##*/} ..."
8+
9+
# set SECRETFILE to the contents of the full-path textfile
10+
SECRETFILE=$(cat ${FILENAME})
11+
# SECRETFILE=${FILENAME}
12+
# echo "[secret-init] Set SECRETFILE to ${SECRETFILE}" # DEBUG - rm for prod!
13+
14+
# if SECRETFILE exists / is not null
15+
if [[ -f ${SECRETFILE} ]]; then
16+
# strip the appended "__FILE" from environmental variable name ...
17+
STRIPFILE=$(echo ${FILENAME} | sed "s/__FILE//g")
18+
# echo "[secret-init] Set STRIPFILE to ${STRIPFILE}" # DEBUG - rm for prod!
19+
20+
# ... and set value to contents of secretfile
21+
# since s6 uses text files, this is effectively "export ..."
22+
printf $(cat ${SECRETFILE}) > ${STRIPFILE}
23+
# echo "[secret-init] Set ${STRIPFILE##*/} to $(cat ${STRIPFILE})" # DEBUG - rm for prod!"
24+
echo "[secret-init] Success! ${STRIPFILE##*/} set from ${FILENAME##*/}"
25+
26+
else
27+
echo "[secret-init] cannot find secret in ${FILENAME}"
28+
fi
29+
done

docker/rootfs/etc/nginx/nginx.conf

+3
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ http {
6969
real_ip_header X-Real-IP;
7070
real_ip_recursive on;
7171

72+
# Custom
73+
include /data/nginx/custom/http_top[.]conf;
74+
7275
# Files generated by NPM
7376
include /etc/nginx/conf.d/*.conf;
7477
include /data/nginx/default_host/*.conf;

docs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ services:
6666
- ./data:/data
6767
- ./letsencrypt:/etc/letsencrypt
6868
db:
69-
image: 'jc21/mariadb-aria:10.4'
69+
image: 'jc21/mariadb-aria:latest'
7070
environment:
7171
MYSQL_ROOT_PASSWORD: 'npm'
7272
MYSQL_DATABASE: 'npm'

docs/advanced-config/README.md

+61
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,66 @@
11
# Advanced Configuration
22

3+
## Docker Secrets
4+
5+
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.
6+
7+
You can set any environment variable from a file by appending `__FILE` (double-underscore FILE) to the environmental variable name.
8+
9+
```yml
10+
version: "3.7"
11+
12+
secrets:
13+
# Secrets are single-line text files where the sole content is the secret
14+
# Paths in this example assume that secrets are kept in local folder called ".secrets"
15+
DB_ROOT_PWD:
16+
file: .secrets/db_root_pwd.txt
17+
MYSQL_PWD:
18+
file: .secrets/mysql_pwd.txt
19+
20+
services:
21+
app:
22+
image: 'jc21/nginx-proxy-manager:latest'
23+
restart: always
24+
ports:
25+
# Public HTTP Port:
26+
- '80:80'
27+
# Public HTTPS Port:
28+
- '443:443'
29+
# Admin Web Port:
30+
- '81:81'
31+
environment:
32+
# These are the settings to access your db
33+
DB_MYSQL_HOST: "db"
34+
DB_MYSQL_PORT: 3306
35+
DB_MYSQL_USER: "npm"
36+
# DB_MYSQL_PASSWORD: "npm" # use secret instead
37+
DB_MYSQL_PASSWORD__FILE: /run/secrets/MYSQL_PWD
38+
DB_MYSQL_NAME: "npm"
39+
# If you would rather use Sqlite uncomment this
40+
# and remove all DB_MYSQL_* lines above
41+
# DB_SQLITE_FILE: "/data/database.sqlite"
42+
# Uncomment this if IPv6 is not enabled on your host
43+
# DISABLE_IPV6: 'true'
44+
volumes:
45+
- ./data:/data
46+
- ./letsencrypt:/etc/letsencrypt
47+
depends_on:
48+
- db
49+
db:
50+
image: jc21/mariadb-aria
51+
restart: always
52+
environment:
53+
# MYSQL_ROOT_PASSWORD: "npm" # use secret instead
54+
MYSQL_ROOT_PASSWORD__FILE: /run/secrets/DB_ROOT_PWD
55+
MYSQL_DATABASE: "npm"
56+
MYSQL_USER: "npm"
57+
# MYSQL_PASSWORD: "npm" # use secret instead
58+
MYSQL_PASSWORD__FILE: /run/secrets/MYSQL_PWD
59+
volumes:
60+
- ./data/mysql:/var/lib/mysql
61+
```
62+
63+
364
## Disabling IPv6
465
566
On some docker hosts IPv6 may not be enabled. In these cases, the following message may be seen in the log:

docs/setup/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ services:
5151
depends_on:
5252
- db
5353
db:
54-
image: jc21/mariadb-aria:10.4
54+
image: 'jc21/mariadb-aria:latest'
5555
restart: always
5656
environment:
5757
MYSQL_ROOT_PASSWORD: 'npm'

global/certbot-dns-plugins.js

+11
Original file line numberDiff line numberDiff line change
@@ -291,4 +291,15 @@ aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`,
291291
credentials: 'certbot_dns_vultr:dns_vultr_key = YOUR_VULTR_API_KEY',
292292
full_plugin_name: 'certbot-dns-vultr:dns-vultr',
293293
},
294+
//####################################################//
295+
eurodns: {
296+
display_name: 'EuroDNS',
297+
package_name: 'certbot-dns-eurodns',
298+
package_version: '0.0.4',
299+
dependencies: '',
300+
credentials: `dns_eurodns_applicationId = myuser
301+
dns_eurodns_apiKey = mysecretpassword
302+
dns_eurodns_endpoint = https://rest-api.eurodns.com/user-api-gateway/proxy`,
303+
full_plugin_name: 'certbot-dns-eurodns:dns-eurodns',
304+
},
294305
};

0 commit comments

Comments
 (0)