blob: daa2896e9f20cdaaa5c7ecd979e6f4d0890d52d2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
ARG PROXY_REGISTRY
FROM ${PROXY_REGISTRY}nginxinc/nginx-unprivileged:1
ENV DST_DIR=/var/www/html/books
COPY .docker/web-nginx/nginx.conf /etc/nginx/templates/nginx.conf.template
COPY . ${DST_DIR}
COPY .docker/app/index.php /var/www/html
USER 0
# Ensure r/o
RUN chown -R root:root /var/www/html && \
chmod -R u=rwX,go=rX /var/www/html
USER 101
# By default, nginx will send the php requests to "app" server, but this server
# name can be overridden at runtime by passing an APP_UPSTREAM env var
ENV APP_UPSTREAM=${APP_UPSTREAM:-app}
# Webroot (defaults to /var/www/html)
ENV APP_WEB_ROOT=${APP_WEB_ROOT:-/var/www/html}
# Base location for epube (defaults to /books)
ENV APP_BASE=${APP_BASE:-/books}
# In order to make epube appear on website root without /books/ set above as follows in .env:
# APP_WEB_ROOT=/var/www/html/books
# APP_BASE=
# Resolver for nginx (kube-dns.kube-system.svc.cluster.local for k8s)
ENV RESOLVER=${RESOLVER:-127.0.0.11}
# It's necessary to set the following NGINX_ENVSUBST_OUTPUT_DIR env var to tell
# nginx to replace the env vars of /etc/nginx/templates/nginx.conf.template
# and put the result in /etc/nginx/nginx.conf (instead of /etc/nginx/conf.d/nginx.conf)
# See https://github.com/docker-library/docs/tree/master/nginx#using-environment-variables-in-nginx-configuration-new-in-119
ENV NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx
|