diff options
| author | Jan Friedli | 2020-03-29 22:49:22 +0200 |
|---|---|---|
| committer | Jan Friedli | 2020-05-09 21:21:49 +0200 |
| commit | ac21ea756c18453954cdc87e9d33a9676ef48066 (patch) | |
| tree | 06ab11f9c6fbdbed1f68519c18dd92d540dbac88 | |
| parent | e69d97e7ed58bb753cc89b0b8bf9a671b9dde296 (diff) | |
moved uwsgi.sock to /run/uwsgi
| -rw-r--r-- | README.md | 10 | ||||
| -rw-r--r-- | config/nginx-default.conf | 2 | ||||
| -rw-r--r-- | config/uwsgi.config | 2 |
3 files changed, 3 insertions, 11 deletions
| @@ -84,14 +84,6 @@ collector cronjob to remove leftover files. Besides, it can create a | |||
| 84 | the uploads folder, to ensure that the uploaded files won't be recoverable | 84 | the uploads folder, to ensure that the uploaded files won't be recoverable |
| 85 | between reboots. | 85 | between reboots. |
| 86 | 86 | ||
| 87 | |||
| 88 | # Deploy using Docker | ||
| 89 | You can find the ready to run docker image here: | ||
| 90 | https://0xacab.org/jvoisin/mat2-web/container_registry | ||
| 91 | |||
| 92 | Example: | ||
| 93 | `docker run -p 80:80 -d -e MAT2_ALLOW_ORIGIN_WHITELIST='https://myhost1.org' registry.0xacab.org/jvoisin/mat2-web:latest` | ||
| 94 | |||
| 95 | # Development | 87 | # Development |
| 96 | Install docker and docker-compose and then run `docker-compose up` to setup | 88 | Install docker and docker-compose and then run `docker-compose up` to setup |
| 97 | the docker dev environment. Mat2-web is now accessible on your host machine at `localhost:5000`. | 89 | the docker dev environment. Mat2-web is now accessible on your host machine at `localhost:5000`. |
| @@ -205,7 +197,7 @@ repository: https://0xacab.org/jvoisin/mat2-web/container_registry | |||
| 205 | ### Building the production image | 197 | ### Building the production image |
| 206 | Build command: `docker build -f Dockerfile.production -t mat-web .` | 198 | Build command: `docker build -f Dockerfile.production -t mat-web .` |
| 207 | 199 | ||
| 208 | Run it: ` docker run -ti -p8181:8080 --security-opt=no-new-privileges --read-only --tmpfs /tmp --tmpfs=/var/www/mat2-web/uploads mat-web:latest` | 200 | Run it: `docker run -ti -p8181:8080 --read-only --tmpfs /tmp --tmpfs /run/uwsgi --tmpfs=/var/www/mat2-web/uploads mat-web:latest` |
| 209 | 201 | ||
| 210 | This does mount the upload folder as tmpfs and servers the app on `localhost:8181`. | 202 | This does mount the upload folder as tmpfs and servers the app on `localhost:8181`. |
| 211 | 203 | ||
diff --git a/config/nginx-default.conf b/config/nginx-default.conf index 52c2fe2..f4d8baa 100644 --- a/config/nginx-default.conf +++ b/config/nginx-default.conf | |||
| @@ -9,6 +9,6 @@ server { | |||
| 9 | location / { try_files $uri @yourapplication; } | 9 | location / { try_files $uri @yourapplication; } |
| 10 | location @yourapplication { | 10 | location @yourapplication { |
| 11 | include uwsgi_params; | 11 | include uwsgi_params; |
| 12 | uwsgi_pass unix:/tmp/uwsgi.sock; | 12 | uwsgi_pass unix:/run/uwsgi/uwsgi.sock; |
| 13 | } | 13 | } |
| 14 | } | 14 | } |
diff --git a/config/uwsgi.config b/config/uwsgi.config index 56e0508..05dd9c1 100644 --- a/config/uwsgi.config +++ b/config/uwsgi.config | |||
| @@ -13,7 +13,7 @@ gid = 101 | |||
| 13 | harakiri = 30 | 13 | harakiri = 30 |
| 14 | die-on-term = true | 14 | die-on-term = true |
| 15 | 15 | ||
| 16 | socket = /tmp/uwsgi.sock | 16 | socket = /run/uwsgi/uwsgi.sock |
| 17 | chmod-socket = 774 | 17 | chmod-socket = 774 |
| 18 | plugins = python3 | 18 | plugins = python3 |
| 19 | 19 | ||
