-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
53 lines (42 loc) · 1.21 KB
/
Dockerfile
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM nginx:1.13-alpine
ENV TERM xterm-256color
RUN apk update \
&& apk add \
python2 \
py2-pip \
wrk \
curl \
nano
RUN pip install --upgrade pip \
&& pip install \
Jinja2 \
&& rm -r /root/.cache
COPY nginx.template.conf /app/nginx.template.conf
COPY start.sh /app/start.sh
COPY environment_template.py /app/environment_template.py
RUN chmod 700 /app/start.sh
ENV DEBIAN_FRONTEND noninteractive
ENV WORKDIR /app
# these are the main two parameters
ENV NGINX_SERVER_PORT '8080'
ENV NGINX_UPSTREAM_SERVER '127.0.0.1:8000'
ENV NGINX_ERROR_LOGLEVEL 'info'
ENV NGINX_MULTI_ACCEPT 'on'
ENV NGINX_WORKER_PROCESSES '4'
ENV NGINX_WORKER_CONNECTIONS '4096'
ENV NGINX_CLIENT_MAX_BODY_SIZE '70M'
ENV NGINX_CLIENT_BODY_TIMEOUT '60s'
ENV NGINX_FASTCGI_READ_TIMEOUT '60s'
ENV NGINX_PROXY_READ_TIMEOUT '60s'
ENV NGINX_GZIP_TYPES 'application/xml application/json'
ENV NGINX_UPSTREAM_KEEPALIVE '32'
ENV NGINX_KEEPALIVE_TIMEOUT '3600s'
ENV NGINX_KEEPALIVE_REQUESTS '9999999'
ENV NGINX_HEALTHCHECK_PATH '/__healthcheck'
ENV NGINX_PROXY_LOCATION '~ /'
ENV NGINX_PROXY_TRAILING_SLASH 'false'
ENV NGINX_PROXY_WEBSOCKET 'false'
ENV NGINX_ACCESS_LOG_TO_STDOUT 'true'
WORKDIR $WORKDIR
EXPOSE 8080
CMD ["/app/start.sh"]