Finish a working example.

This commit is contained in:
2023-07-05 20:02:50 -07:00
parent 6ce636f1d1
commit 67a1f3cd0c
3 changed files with 33 additions and 16 deletions

View File

@ -1,10 +1,16 @@
# 2022-10-05 Hyperling
# Move config to nginx container.
# This is because nginx image does not play well with Volumes.
# Nextcloud and MariaDB created files in their folders fine, but nginx stays empty.
# Create the nginx environment for a reverse proxy.
# https://docs.docker.com/engine/reference/builder/
FROM nginx
# Add all the configuration files to the environment.
COPY ./config/nginx.conf /etc/nginx/nginx.conf
COPY ./config/conf.d/* /etc/nginx/conf.d/
# Create "working" certificates for the example configuration file.
RUN mkdir -p /etc/nginx/certs/example.com
RUN openssl req -new -x509 -days 5000 -nodes \
-out /etc/nginx/certs/example.com/cert.crt \
-keyout /etc/nginx/certs/example.com/cert.key \
-subj '/CN=example.com/O=Example/C=XX'