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" --- README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index fd723c8..2546c5c 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ configure, feel free to copy [this file](https://0xacab.org/jvoisin/mat2-web/tree/master/config/uwsgi.config) to `/etc/uwsgi/apps-enabled/mat2-web.ini` and [this one](https://0xacab.org/jvoisin/mat2-web/tree/master/config/nginx.config) -to `/etc/nginx/site-enabled/mat2-web`. +to `/etc/nginx/sites-enabled/mat2-web`. Nginx is the recommended web engine, but you can also use Apache if you prefer, by copying [this file](https://0xacab.org/jvoisin/mat2-web/tree/master/config/apache2.config) @@ -73,6 +73,18 @@ collector cronjob to remove leftover files. Besides, it can create a the uploads folder, to ensure that the uploaded files won't be recoverable between reboots. + +# Deploy using Docker +You can find the ready to run docker image here: +https://0xacab.org/jvoisin/mat2-web/container_registry + +Example: +`docker run -p 80:80 -d -e MAT2_ALLOW_ORIGIN_WHITELIST='https://myhost1.org' registry.0xacab.org/jvoisin/mat2-web:latest` + +Make sure to add +`find /var/www/mat2-web/uploads/ -type f -mtime +1 -exec rm {} \;` as cron job +run inside the container. + # Development Install docker and docker-compose and then run `docker-compose up` to setup the docker dev environment. Mat2-web is now accessible on your host machine at `localhost:5000`. @@ -137,6 +149,13 @@ The `file` parameter is the base64 encoded file which will be cleaned. ] ``` +# Docker +There are two Dockerfiles present in this repository. The file called `Dockerfile.development` is used for development +and `Dockerfile.production` is used for production deployments. + +You can find the automated docker builds in the registry of this +repository: https://0xacab.org/jvoisin/mat2-web/container_registry + # Custom templates You can override the default templates from `templates/` by putting replacements -- cgit v1.3