diff options
| -rw-r--r-- | Dockerfile | 8 | ||||
| -rw-r--r-- | README.md | 6 | ||||
| -rw-r--r-- | docker-compose.yml | 12 | ||||
| -rw-r--r-- | requirements.txt | 5 |
4 files changed, 31 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5ca3fd8 --- /dev/null +++ b/Dockerfile | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | FROM python:3.7 | ||
| 2 | ADD . /mat2-web | ||
| 3 | WORKDIR /mat2-web | ||
| 4 | RUN apt-get update | ||
| 5 | RUN apt install -y python3-gi python3-gi-cairo gir1.2-poppler-0.18 \ | ||
| 6 | gir1.2-gdkpixbuf-2.0 libimage-exiftool-perl libgirepository1.0-dev | ||
| 7 | RUN pip install -r requirements.txt | ||
| 8 | CMD flask run --host=0.0.0.0 \ No newline at end of file | ||
| @@ -79,6 +79,12 @@ collector cronjob to remove leftover files. Besides, it can create a | |||
| 79 | the uploads folder, to ensure that the uploaded files won't be recoverable | 79 | the uploads folder, to ensure that the uploaded files won't be recoverable |
| 80 | between reboots. | 80 | between reboots. |
| 81 | 81 | ||
| 82 | # Development | ||
| 83 | Install docker and docker-compose and then run `docker-compose up` to setup | ||
| 84 | the docker dev environment. Mat2-web is now accessible on your host machine at `localhost:5000`. | ||
| 85 | Every code change triggers a restart of the app. | ||
| 86 | If you want to add/remove dependencies you have to rebuild the container. | ||
| 87 | |||
| 82 | # Custom templates | 88 | # Custom templates |
| 83 | 89 | ||
| 84 | You can override the default templates from `templates/` by putting replacements | 90 | You can override the default templates from `templates/` by putting replacements |
diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c5f8b32 --- /dev/null +++ b/docker-compose.yml | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | version: '2' | ||
| 2 | services: | ||
| 3 | web: | ||
| 4 | build: . | ||
| 5 | environment: | ||
| 6 | - FLASK_APP=main.py | ||
| 7 | - FLASK_ENV=development | ||
| 8 | ports: | ||
| 9 | - "5000:5000" | ||
| 10 | volumes: | ||
| 11 | - .:/mat2-web | ||
| 12 | restart: always | ||
diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..7cab5aa --- /dev/null +++ b/requirements.txt | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | mutagen==1.42.0 | ||
| 2 | ffmpeg==1.4 | ||
| 3 | bubblewrap==1.2.0 | ||
| 4 | mat2==0.9.0 | ||
| 5 | flask==1.0.3 \ No newline at end of file | ||
