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 /README.md | |
| parent | 08ce6aed7662ecf5586d6782ef6449c2ec564ed9 (diff) | |
Resolve "Create a docker image"
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 21 |
1 files changed, 20 insertions, 1 deletions
| @@ -35,7 +35,7 @@ configure, feel free to copy | |||
| 35 | [this file](https://0xacab.org/jvoisin/mat2-web/tree/master/config/uwsgi.config) | 35 | [this file](https://0xacab.org/jvoisin/mat2-web/tree/master/config/uwsgi.config) |
| 36 | to `/etc/uwsgi/apps-enabled/mat2-web.ini` and | 36 | to `/etc/uwsgi/apps-enabled/mat2-web.ini` and |
| 37 | [this one](https://0xacab.org/jvoisin/mat2-web/tree/master/config/nginx.config) | 37 | [this one](https://0xacab.org/jvoisin/mat2-web/tree/master/config/nginx.config) |
| 38 | to `/etc/nginx/site-enabled/mat2-web`. | 38 | to `/etc/nginx/sites-enabled/mat2-web`. |
| 39 | 39 | ||
| 40 | Nginx is the recommended web engine, but you can also use Apache if you prefer, | 40 | Nginx is the recommended web engine, but you can also use Apache if you prefer, |
| 41 | by copying [this file](https://0xacab.org/jvoisin/mat2-web/tree/master/config/apache2.config) | 41 | 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 | |||
| 73 | the uploads folder, to ensure that the uploaded files won't be recoverable | 73 | the uploads folder, to ensure that the uploaded files won't be recoverable |
| 74 | between reboots. | 74 | between reboots. |
| 75 | 75 | ||
| 76 | |||
| 77 | # Deploy using Docker | ||
| 78 | You can find the ready to run docker image here: | ||
| 79 | https://0xacab.org/jvoisin/mat2-web/container_registry | ||
| 80 | |||
| 81 | Example: | ||
| 82 | `docker run -p 80:80 -d -e MAT2_ALLOW_ORIGIN_WHITELIST='https://myhost1.org' registry.0xacab.org/jvoisin/mat2-web:latest` | ||
| 83 | |||
| 84 | Make sure to add | ||
| 85 | `find /var/www/mat2-web/uploads/ -type f -mtime +1 -exec rm {} \;` as cron job | ||
| 86 | run inside the container. | ||
| 87 | |||
| 76 | # Development | 88 | # Development |
| 77 | Install docker and docker-compose and then run `docker-compose up` to setup | 89 | Install docker and docker-compose and then run `docker-compose up` to setup |
| 78 | the docker dev environment. Mat2-web is now accessible on your host machine at `localhost:5000`. | 90 | 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. | |||
| 137 | ] | 149 | ] |
| 138 | ``` | 150 | ``` |
| 139 | 151 | ||
| 152 | # Docker | ||
| 153 | There are two Dockerfiles present in this repository. The file called `Dockerfile.development` is used for development | ||
| 154 | and `Dockerfile.production` is used for production deployments. | ||
| 155 | |||
| 156 | You can find the automated docker builds in the registry of this | ||
| 157 | repository: https://0xacab.org/jvoisin/mat2-web/container_registry | ||
| 158 | |||
| 140 | # Custom templates | 159 | # Custom templates |
| 141 | 160 | ||
| 142 | You can override the default templates from `templates/` by putting replacements | 161 | You can override the default templates from `templates/` by putting replacements |
