From ca0c515ddc347d108fcf9a11418369a7414a325f Mon Sep 17 00:00:00 2001 From: lza_menace Date: Tue, 11 Aug 2020 00:15:11 -0700 Subject: [PATCH] fuck this docker shit, gunicorn local --- .dockerignore | 6 ------ .gitignore | 1 - Dockerfile | 7 ------- bin/prod | 8 ++++++++ docker-compose.yaml | 14 -------------- 5 files changed, 8 insertions(+), 28 deletions(-) delete mode 100644 .dockerignore delete mode 100644 Dockerfile create mode 100644 bin/prod delete mode 100644 docker-compose.yaml diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 4cd1b48..0000000 --- a/.dockerignore +++ /dev/null @@ -1,6 +0,0 @@ -data -flask_session -bin -.venv -.git -.idea diff --git a/.gitignore b/.gitignore index d7eb19c..7e769ef 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,3 @@ __pycache__ *sql flask_session config.py -docker-compose.*.yaml diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 526ff47..0000000 --- a/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM python:slim - -WORKDIR /srv - -COPY . . - -RUN pip3 install -r requirements.txt diff --git a/bin/prod b/bin/prod new file mode 100644 index 0000000..0abfb24 --- /dev/null +++ b/bin/prod @@ -0,0 +1,8 @@ +#!/bin/bash + +source .venv/bin/activate +export FLASK_APP=suchwow/app.py +export FLASK_SECRETS=config.py +export FLASK_DEBUG=0 +export FLASK_ENV=production +gunicorn --bind 0.0.0.0:4000 "suchwow.app:app" -D diff --git a/docker-compose.yaml b/docker-compose.yaml deleted file mode 100644 index 972510b..0000000 --- a/docker-compose.yaml +++ /dev/null @@ -1,14 +0,0 @@ -version: '3' -services: - suchwow: - 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