diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2019-07-24 11:58:57 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2019-07-24 12:01:10 +0200 |
commit | 752e0fdd8c3cdd7c65acf27bb06a6b2cae47cb3c (patch) | |
tree | 08d2513e5ea427cdf62db51aa33d7da413f9c9d1 | |
parent | ac0ece82fe81b4dfcd0c1e722f520337d5c4ea5f (diff) |
Add Docker config
-rw-r--r-- | .dockerignore | 10 | ||||
-rw-r--r-- | Dockerfile | 16 | ||||
-rw-r--r-- | requirements.txt | 12 |
3 files changed, 38 insertions, 0 deletions
diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3314867 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,10 @@ +.dockerignore +.git +.gitignore +**/__pycache__ +**/*.pyc +fbin/fbin.cfg +files +*.sqlite +run.py +thumbs diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b8d2f07 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM python:3.7 as pyfbin + +WORKDIR /app +COPY requirements.txt . + +RUN apt-get update && apt-get install -y --no-install-recommends \ + ffmpegthumbnailer \ + imagemagick \ + && apt-get clean && rm -rf /var/lib/apt/lists/* \ + && pip install --no-cache-dir -r requirements.txt + +COPY . . + +EXPOSE 8000 + +CMD ["gunicorn", "-b", ":8000", "-w", "2", "-k", "gevent", "fbin:app"] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..54220c9 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,12 @@ +boto3 +cryptography +flask +Flask-Login +gevent +gunicorn +jinja2 +Pillow +psycopg2-binary +PyJWT +requests +sqlalchemy |