30 lines
860 B
Nginx Configuration File
Executable file
30 lines
860 B
Nginx Configuration File
Executable file
# =========================================================
|
|
# Nginx Dockerfile with SSL mode (selfsigned / real)
|
|
# =========================================================
|
|
FROM nginx:stable-alpine
|
|
|
|
# --- Proxy support ---
|
|
ARG HTTP_PROXY
|
|
ARG HTTPS_PROXY
|
|
ENV http_proxy=${HTTP_PROXY}
|
|
ENV https_proxy=${HTTPS_PROXY}
|
|
ENV HTTP_PROXY=${HTTP_PROXY}
|
|
ENV HTTPS_PROXY=${HTTPS_PROXY}
|
|
ENV NO_PROXY=localhost,127.0.0.1
|
|
|
|
# --- Install envsubst for template rendering ---
|
|
RUN apk add --no-cache bash gettext openssl
|
|
|
|
# --- Copy configuration template and entrypoint ---
|
|
COPY docker/nginx/nginx.conf.template /etc/nginx/nginx.conf.template
|
|
COPY docker/nginx/entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
# --- Make sure certs directory exists ---
|
|
RUN mkdir -p /etc/nginx/certs
|
|
|
|
WORKDIR /etc/nginx
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
CMD ["nginx", "-g", "daemon off;"]
|