-
Notifications
You must be signed in to change notification settings - Fork 43
/
Dockerfile.alpine
44 lines (25 loc) · 958 Bytes
/
Dockerfile.alpine
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM nginxproxy/nginx-proxy:alpine
RUN apk add nginx-module-njs
ENV AUTO_UPGRADE=1
ENV LE_WORKING_DIR=/acme.sh
ENV LE_CONFIG_HOME=/acmecerts
RUN wget -O- https://get.acme.sh | sh && crontab -l | sed 's#> /dev/null##' | crontab - \
&& $LE_WORKING_DIR/acme.sh --set-default-ca --server letsencrypt
VOLUME ["/acmecerts"]
EXPOSE 443
COPY nginx.tmpl /app/
COPY Procfile /app/
RUN echo "cron: crond -f" >>/app/Procfile
COPY updatessl.sh /app/
RUN chmod +x /app/updatessl.sh
RUN mkdir -p /etc/nginx/stream.d && echo "stream { \
include /etc/nginx/stream.d/*.conf; \
}" >> /etc/nginx/nginx.conf
RUN sed -i '1s|^|load_module modules/ngx_http_js_module.so;\n|' /etc/nginx/nginx.conf \
&& sed -i '1s|^|load_module modules/ngx_stream_js_module.so;\n|' /etc/nginx/nginx.conf
RUN mkdir -p /etc/nginx/socks
VOLUME ["/etc/nginx/stream.d"]
COPY entry.sh /app/
RUN chmod +x /app/entry.sh
ENTRYPOINT ["/app/entry.sh"]
CMD ["forego", "start", "-r"]