Creating docker-compose.prod.yml for use in TrueNAS, etc. Reworking Dockerfiles to enable this new functionality. Leaving docker-compose.yml for use in local development.

This commit is contained in:
Roland 2025-06-29 11:50:44 -06:00
parent 5712f17d8b
commit 78a83dc63e
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
12 changed files with 333 additions and 66 deletions

View file

@ -1,12 +1,16 @@
# This Dockerfile is used as a reverse proxy to serve a HTTPS nieve service with HTTPS.
FROM nginx:latest as https_proxy
FROM nginx:alpine
WORKDIR /etc/nginx
# 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
# Generate self-signed certificate and key.
RUN apk add --no-cache openssl && \
openssl genrsa -out /cert.key 2048 && \
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" && \
chmod 600 /cert.key /cert.crt && \
apk del openssl
# Copy Nginx configuration
# Copy Nginx configuration.
COPY docker/https_proxy/nginx.proxy.conf /etc/nginx/nginx.conf
CMD ["nginx", "-g", "daemon off;"]
# Run Nginx in foreground.
CMD ["nginx", "-g", "daemon off;"]