From 95504d8bd41233afa970a10bfbef42b598932140 Mon Sep 17 00:00:00 2001 From: lza_menace Date: Sat, 8 Aug 2020 00:15:08 -0700 Subject: [PATCH] adding some docker shit --- .dockerignore | 6 ++++++ .gitignore | 1 + Dockerfile | 7 +++++++ docker-compose.yaml | 14 ++++++++++++++ requirements.txt | 1 + 5 files changed, 29 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 docker-compose.yaml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..4cd1b48 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +data +flask_session +bin +.venv +.git +.idea diff --git a/.gitignore b/.gitignore index 7e769ef..d7eb19c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ __pycache__ *sql flask_session config.py +docker-compose.*.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..526ff47 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM python:slim + +WORKDIR /srv + +COPY . . + +RUN pip3 install -r requirements.txt diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..20f0678 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,14 @@ +version: '3' +services: + wownero-explorer: + build: + context: . + command: gunicorn --bind 0.0.0.0:4000 "suchwow.app:app" + labels: + - "traefik.http.routers.http.rule=Host(`localhost`)" + - "traefik.http.routers.http.entrypoints=http" + environment: + FLASK_SECRETS: config.py + FLASK_APP: suchwow/app.py + ports: + - 4000:4000 diff --git a/requirements.txt b/requirements.txt index 607354e..0a59210 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ requests flask flask-session peewee +gunicorn