Update Dockerfile
Browse files- Dockerfile +12 -0
Dockerfile
CHANGED
|
@@ -35,6 +35,7 @@ RUN apt-get update && apt-get install -y \
|
|
| 35 |
netcat-openbsd \
|
| 36 |
net-tools \
|
| 37 |
procps \
|
|
|
|
| 38 |
&& rm -rf /var/lib/apt/lists/* \
|
| 39 |
&& pip install --no-cache-dir "poetry==${POETRY_VERSION}" \
|
| 40 |
&& sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \
|
|
@@ -43,6 +44,10 @@ RUN apt-get update && apt-get install -y \
|
|
| 43 |
# Configure nginx
|
| 44 |
RUN rm /etc/nginx/sites-enabled/default || true
|
| 45 |
COPY <<EOF /etc/nginx/nginx.conf
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
events {
|
| 47 |
worker_connections 1024;
|
| 48 |
}
|
|
@@ -52,6 +57,11 @@ http {
|
|
| 52 |
default_type application/octet-stream;
|
| 53 |
sendfile on;
|
| 54 |
keepalive_timeout 120;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
# Added buffer size configurations
|
| 57 |
proxy_buffer_size 128k;
|
|
@@ -119,10 +129,12 @@ EOF
|
|
| 119 |
|
| 120 |
# Set up directories and permissions
|
| 121 |
RUN mkdir -p /var/log/nginx /var/run/postgresql /var/lib/postgresql/data /var/log/postgresql /app/api /app/web /data/storage && \
|
|
|
|
| 122 |
chown -R root:root /etc/nginx && \
|
| 123 |
chmod -R 755 /etc/nginx && \
|
| 124 |
touch /run/nginx.pid && \
|
| 125 |
chown -R root:root /run/nginx.pid && \
|
|
|
|
| 126 |
chmod -R 755 /var/lib/nginx && \
|
| 127 |
chmod -R 777 /run && \
|
| 128 |
chmod 700 /var/lib/postgresql/data && \
|
|
|
|
| 35 |
netcat-openbsd \
|
| 36 |
net-tools \
|
| 37 |
procps \
|
| 38 |
+
psmisc \
|
| 39 |
&& rm -rf /var/lib/apt/lists/* \
|
| 40 |
&& pip install --no-cache-dir "poetry==${POETRY_VERSION}" \
|
| 41 |
&& sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \
|
|
|
|
| 44 |
# Configure nginx
|
| 45 |
RUN rm /etc/nginx/sites-enabled/default || true
|
| 46 |
COPY <<EOF /etc/nginx/nginx.conf
|
| 47 |
+
user user;
|
| 48 |
+
pid /run/nginx.pid;
|
| 49 |
+
worker_processes auto;
|
| 50 |
+
|
| 51 |
events {
|
| 52 |
worker_connections 1024;
|
| 53 |
}
|
|
|
|
| 57 |
default_type application/octet-stream;
|
| 58 |
sendfile on;
|
| 59 |
keepalive_timeout 120;
|
| 60 |
+
client_body_temp_path /var/lib/nginx/body;
|
| 61 |
+
proxy_temp_path /var/lib/nginx/proxy;
|
| 62 |
+
fastcgi_temp_path /var/lib/nginx/fastcgi;
|
| 63 |
+
uwsgi_temp_path /var/lib/nginx/uwsgi;
|
| 64 |
+
scgi_temp_path /var/lib/nginx/scgi;
|
| 65 |
|
| 66 |
# Added buffer size configurations
|
| 67 |
proxy_buffer_size 128k;
|
|
|
|
| 129 |
|
| 130 |
# Set up directories and permissions
|
| 131 |
RUN mkdir -p /var/log/nginx /var/run/postgresql /var/lib/postgresql/data /var/log/postgresql /app/api /app/web /data/storage && \
|
| 132 |
+
mkdir -p /var/lib/nginx/body /var/lib/nginx/proxy /var/lib/nginx/fastcgi /var/lib/nginx/uwsgi /var/lib/nginx/scgi && \
|
| 133 |
chown -R root:root /etc/nginx && \
|
| 134 |
chmod -R 755 /etc/nginx && \
|
| 135 |
touch /run/nginx.pid && \
|
| 136 |
chown -R root:root /run/nginx.pid && \
|
| 137 |
+
chown -R user:user /var/lib/nginx && \
|
| 138 |
chmod -R 755 /var/lib/nginx && \
|
| 139 |
chmod -R 777 /run && \
|
| 140 |
chmod 700 /var/lib/postgresql/data && \
|