mirror of
https://0xacab.org/jvoisin/mat2-web.git
synced 2025-02-23 08:39:57 -05:00
added a docker dev environment
Signed-off-by: Jan Friedli <jan.friedli@immerda.ch>
This commit is contained in:
parent
ac0acded89
commit
9d155d171e
8
Dockerfile
Normal file
8
Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM python:3.7
|
||||
ADD . /mat2-web
|
||||
WORKDIR /mat2-web
|
||||
RUN apt-get update
|
||||
RUN apt install -y python3-gi python3-gi-cairo gir1.2-poppler-0.18 \
|
||||
gir1.2-gdkpixbuf-2.0 libimage-exiftool-perl libgirepository1.0-dev
|
||||
RUN pip install -r requirements.txt
|
||||
CMD flask run --host=0.0.0.0
|
@ -79,6 +79,12 @@ 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.
|
||||
|
||||
# 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`.
|
||||
Every code change triggers a restart of the app.
|
||||
If you want to add/remove dependencies you have to rebuild the container.
|
||||
|
||||
# Custom templates
|
||||
|
||||
You can override the default templates from `templates/` by putting replacements
|
||||
|
12
docker-compose.yml
Normal file
12
docker-compose.yml
Normal file
@ -0,0 +1,12 @@
|
||||
version: '2'
|
||||
services:
|
||||
web:
|
||||
build: .
|
||||
environment:
|
||||
- FLASK_APP=main.py
|
||||
- FLASK_ENV=development
|
||||
ports:
|
||||
- "5000:5000"
|
||||
volumes:
|
||||
- .:/mat2-web
|
||||
restart: always
|
5
requirements.txt
Normal file
5
requirements.txt
Normal file
@ -0,0 +1,5 @@
|
||||
mutagen==1.42.0
|
||||
ffmpeg==1.4
|
||||
bubblewrap==1.2.0
|
||||
mat2==0.9.0
|
||||
flask==1.0.3
|
Loading…
x
Reference in New Issue
Block a user