-
Notifications
You must be signed in to change notification settings - Fork 27
/
Dockerfile
31 lines (24 loc) · 1.02 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
FROM nginx:latest
MAINTAINER Martin van Beurden <[email protected]>
ENV DATA_DIR /app/
ADD start.sh /usr/local/bin/
ONBUILD ADD app $DATA_DIR
ONBUILD ADD conf /etc/nginx/conf.d/
# Disable daemon mode
RUN echo "\ndaemon off;" >> /etc/nginx/nginx.conf && \
# Defaults proxy_params
echo 'proxy_connect_timeout 600;' >> /etc/nginx/proxy_params && \
echo 'proxy_send_timeout 600;' >> /etc/nginx/proxy_params && \
echo 'proxy_read_timeout 600;' >> /etc/nginx/proxy_params && \
echo 'send_timeout 600;' >> /etc/nginx/proxy_params && \
# Defaults fastcgi_params
echo 'fastcgi_connect_timeout 60;' >> /etc/nginx/fastcgi_params && \
echo 'fastcgi_send_timeout 150;' >> /etc/nginx/fastcgi_params && \
echo 'fastcgi_read_timeout 300;' >> /etc/nginx/fastcgi_params && \
# backup
cp -a /etc/nginx/conf.d /etc/nginx/.conf.d.orig && \
rm -f /etc/nginx/conf.d/default.conf && \
mkdir -p $DATA_DIR && \
chown -R www-data:www-data $DATA_DIR
WORKDIR /etc/nginx
CMD ["/usr/local/bin/start.sh"]