summaryrefslogtreecommitdiff
path: root/Dockerfile.production
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile.production')
-rw-r--r--Dockerfile.production24
1 files changed, 24 insertions, 0 deletions
diff --git a/Dockerfile.production b/Dockerfile.production
new file mode 100644
index 0000000..1d5b0a1
--- /dev/null
+++ b/Dockerfile.production
@@ -0,0 +1,24 @@
1From debian:buster-slim
2WORKDIR /var/www/mat2-web
3COPY . /var/www/mat2-web
4RUN apt-get update \
5&& apt-get install --no-install-recommends --no-install-suggests --yes \
6 systemd \
7 mat2 \
8 uwsgi \
9 uwsgi-plugin-python3 \
10 nginx-light \
11 python3-pip \
12 python3-setuptools \
13 python3-wheel \
14&& rm -rf /var/cache/apt/* /var/lib/apt/lists/* \
15&& pip3 install -r requirements.txt \
16&& mkdir ./uploads \
17&& chown -R www-data:www-data . \
18&& cp ./config/uwsgi.config /etc/uwsgi/apps-enabled/mat2-web.ini \
19&& rm /etc/nginx/sites-enabled/default \
20&& mkdir -p /etc/nginx/sites-enabled/ \
21&& cp ./config/nginx.config /etc/nginx/sites-enabled/mat2.conf \
22&& chmod +x ./startup-server.sh
23
24CMD ["./startup-server.sh"] \ No newline at end of file