Chad 3c46dfec01
Fixes for Reverse Proxy Go-Live (#6)
* Add new area for defining upstream systems.

* Example file for demonstration domain.

* Use the new upstream hosts section.

* Do the proxy directives in the main file.

* Commit any final changes.

* Fix example resource name.

* Mention the need to have ports specified in the upstream file, not server block.

* Adjust formatting.
2023-07-09 16:02:47 -07:00

27 lines
702 B
Docker

# 2022-10-05 Hyperling
# Create the nginx environment for a reverse proxy.
# https://docs.docker.com/engine/reference/builder/
FROM nginx
## Configuration Files ##
# Clear old configurations.
RUN rm -rfv /etc/nginx/conf.d
# Add all the configuration files to the environment.
COPY ./config/nginx.conf /etc/nginx/nginx.conf
COPY ./config/conf.d /etc/nginx/conf.d
RUN rm -rfv /etc/nginx/nginx.conf/README*
## Hosted Sites ##
# Clear old sites.
RUN rm -rfv /etc/nginx/html
# Add any static HTML websites.
COPY ./config/html /etc/nginx/html
RUN rm -rfv /etc/nginx/html/README*
## Upstream Hosts ##
RUN rm -rfv /etc/nginx/hosts
COPY ./config/hosts /etc/nginx/hosts
RUN rm -rfv /etc/nginx/hosts/README*