From 3a3d1227558a2c405456e3ddab451675e7bbd552 Mon Sep 17 00:00:00 2001 From: jfriedli Date: Wed, 28 Aug 2019 08:33:28 -0700 Subject: Resolve "Create a docker image" --- Dockerfile.production | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Dockerfile.production (limited to 'Dockerfile.production') diff --git a/Dockerfile.production b/Dockerfile.production new file mode 100644 index 0000000..1d5b0a1 --- /dev/null +++ b/Dockerfile.production @@ -0,0 +1,24 @@ +From debian:buster-slim +WORKDIR /var/www/mat2-web +COPY . /var/www/mat2-web +RUN apt-get update \ +&& apt-get install --no-install-recommends --no-install-suggests --yes \ + systemd \ + mat2 \ + uwsgi \ + uwsgi-plugin-python3 \ + nginx-light \ + python3-pip \ + python3-setuptools \ + python3-wheel \ +&& rm -rf /var/cache/apt/* /var/lib/apt/lists/* \ +&& pip3 install -r requirements.txt \ +&& mkdir ./uploads \ +&& chown -R www-data:www-data . \ +&& cp ./config/uwsgi.config /etc/uwsgi/apps-enabled/mat2-web.ini \ +&& rm /etc/nginx/sites-enabled/default \ +&& mkdir -p /etc/nginx/sites-enabled/ \ +&& cp ./config/nginx.config /etc/nginx/sites-enabled/mat2.conf \ +&& chmod +x ./startup-server.sh + +CMD ["./startup-server.sh"] \ No newline at end of file -- cgit v1.3