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