-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
557df53
commit 06a2d92
Showing
3 changed files
with
33 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,16 +4,14 @@ FROM nginxinc/nginx-unprivileged:stable-alpine | |
|
||
LABEL maintainer "OpenSpeedTest.com <[email protected]>" | ||
|
||
<<<<<<< HEAD | ||
ENV ENABLE_LETSENCRYPT=false | ||
ENV DOMAIN_NAME=false | ||
ENV USER_EMAIL=false | ||
======= | ||
>>>>>>> main | ||
ENV CONFIG=/etc/nginx/conf.d/OpenSpeedTest-Server.conf | ||
|
||
COPY /files/OpenSpeedTest-Server.conf ${CONFIG} | ||
COPY /files/entrypoint.sh /entrypoint.sh | ||
COPY /files/renew.sh /renew.sh | ||
RUN rm /etc/nginx/nginx.conf | ||
COPY /files/nginx.conf /etc/nginx/ | ||
COPY /files/www/ /usr/share/nginx/html/ | ||
|
@@ -23,7 +21,7 @@ COPY /files/nginx.key /etc/ssl/ | |
|
||
|
||
USER root | ||
|
||
VOLUME /var/log/letsencrypt | ||
RUN rm -rf /etc/nginx/conf.d/default.conf \ | ||
&& chown -R nginx /usr/share/nginx/html/ \ | ||
&& chmod 755 /usr/share/nginx/html/downloading \ | ||
|
@@ -32,10 +30,37 @@ RUN rm -rf /etc/nginx/conf.d/default.conf \ | |
&& chmod 400 ${CONFIG} \ | ||
&& chown nginx /etc/nginx/nginx.conf \ | ||
&& chmod 400 /etc/nginx/nginx.conf \ | ||
&& chmod +x /entrypoint.sh | ||
&& chmod +x /entrypoint.sh \ | ||
&& chmod +x /renew.sh | ||
|
||
|
||
|
||
RUN mkdir -p /etc/letsencrypt && \ | ||
chown -R nginx /etc/letsencrypt && \ | ||
chmod 775 /etc/letsencrypt | ||
|
||
RUN mkdir -p /var/lib/letsencrypt && \ | ||
chown -R nginx /var/lib/letsencrypt && \ | ||
chmod 775 /var/lib/letsencrypt | ||
|
||
RUN mkdir -p /var/log/letsencrypt && \ | ||
chown -R nginx /var/log/letsencrypt && \ | ||
chmod 775 /var/log/letsencrypt | ||
|
||
RUN mkdir -p /usr/share/nginx/html/.well-known/acme-challenge && \ | ||
chown -R nginx /usr/share/nginx/html/.well-known/acme-challenge && \ | ||
chmod 775 /usr/share/nginx/html/.well-known/acme-challenge | ||
|
||
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/* | ||
RUN update-ca-certificates | ||
RUN apk add --no-cache certbot certbot-nginx | ||
RUN apk update && apk add --no-cache dcron libcap | ||
|
||
RUN chown nginx:nginx /usr/sbin/crond \ | ||
&& setcap cap_setgid=ep /usr/sbin/crond | ||
|
||
RUN touch /etc/crontabs/nginx | ||
RUN chown -R nginx:nginx /etc/crontabs/nginx | ||
|
||
USER 101 | ||
|
||
|
@@ -44,3 +69,4 @@ EXPOSE 3000 3001 | |
STOPSIGNAL SIGQUIT | ||
|
||
CMD ["/entrypoint.sh"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
# Developed by : Vishnu | https://Vishnu.Pro | Email : [email protected] | ||
|
||
server { | ||
server_name _ localhost; | ||
server_name _ localhost YOURDOMAIN; | ||
listen 3000; | ||
listen 3001 ssl; | ||
listen [::]:3000; | ||
|
@@ -39,7 +39,6 @@ server_name _ localhost; | |
open_file_cache_min_uses 2; | ||
open_file_cache_errors off; | ||
|
||
<<<<<<< HEAD | ||
location ~ /\.well-known/acme-challenge/ { | ||
allow all; | ||
default_type "text/plain"; | ||
|
@@ -48,8 +47,6 @@ server_name _ localhost; | |
break; | ||
} | ||
|
||
======= | ||
>>>>>>> main | ||
location / { | ||
|
||
add_header 'Access-Control-Allow-Origin' "*" always; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters