2024-06-12 18:44:59 -06:00
|
|
|
# This Dockerfile is used as a reverse proxy to serve a HTTPS nieve service with HTTPS.
|
|
|
|
|
FROM nginx:latest as https_proxy
|
|
|
|
|
|
|
|
|
|
# Create a self-signed cert and key pair for HTTPS.
|
|
|
|
|
RUN openssl genrsa -out /cert.key 2048
|
|
|
|
|
RUN openssl req -new -x509 -nodes -key /cert.key -out /cert.crt -days 3650 \
|
|
|
|
|
-subj "/C=US/ST=State/L=City/O=Org/OU=WROLPi/CN=wrolpi.local"
|
|
|
|
|
RUN chmod 777 /cert.key /cert.crt
|
|
|
|
|
|
2025-08-17 11:23:19 -06:00
|
|
|
# Apply docker-compose environment variables to config
|
|
|
|
|
ENV UPSTREAM_HOST=you-must-change-this-in-docker-compose
|
|
|
|
|
ENV UPSTREAM_PORT=80
|
|
|
|
|
COPY docker/https_proxy/nginx.proxy.conf.template /etc/nginx/nginx.conf
|
|
|
|
|
RUN envsubst < /etc/nginx/nginx.conf > /etc/nginx/nginx.conf
|
|
|
|
|
|
2024-06-12 18:44:59 -06:00
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|