Browse Source

fuck this docker shit, gunicorn local

graphs-n-shit
lza_menace 1 year ago
parent
commit
ca0c515ddc
  1. 6
      .dockerignore
  2. 1
      .gitignore
  3. 7
      Dockerfile
  4. 8
      bin/prod
  5. 14
      docker-compose.yaml

6
.dockerignore

@ -1,6 +0,0 @@
data
flask_session
bin
.venv
.git
.idea

1
.gitignore

@ -7,4 +7,3 @@ __pycache__
*sql
flask_session
config.py
docker-compose.*.yaml

7
Dockerfile

@ -1,7 +0,0 @@
FROM python:slim
WORKDIR /srv
COPY . .
RUN pip3 install -r requirements.txt

8
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

14
docker-compose.yaml

@ -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
Loading…
Cancel
Save