diff options
| author | jfriedli | 2019-08-28 08:33:28 -0700 |
|---|---|---|
| committer | jvoisin | 2019-08-28 08:33:28 -0700 |
| commit | 3a3d1227558a2c405456e3ddab451675e7bbd552 (patch) | |
| tree | 4d59c165e4bcfdac629d6271f2905cd8cbb9c344 /Dockerfile.production | |
| parent | 08ce6aed7662ecf5586d6782ef6449c2ec564ed9 (diff) | |
Resolve "Create a docker image"
Diffstat (limited to '')
| -rw-r--r-- | Dockerfile.production | 24 |
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 @@ | |||
| 1 | From debian:buster-slim | ||
| 2 | WORKDIR /var/www/mat2-web | ||
| 3 | COPY . /var/www/mat2-web | ||
| 4 | RUN 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 | |||
| 24 | CMD ["./startup-server.sh"] \ No newline at end of file | ||
