diff --git a/Dockerfile b/Dockerfile index 926f1ed..b7d1bb1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,9 @@ FROM python:3.8 ADD . /root/ -WORKDIR /root +WORKDIR /root/ RUN pip install -r requirements.txt -CMD [ "gunicorn", "--chdir", "src", "app:app"] \ No newline at end of file + +CMD [ "gunicorn", "-b", "0.0.0.0:25565", "src.app:app" ] \ No newline at end of file diff --git a/Procfile b/Procfile index 69c156d..52e7aed 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: gunicorn --chdir src app:app \ No newline at end of file +web: gunicorn src.app:app \ No newline at end of file diff --git a/src/app.py b/src/app.py index 26af52f..bc39afb 100644 --- a/src/app.py +++ b/src/app.py @@ -10,7 +10,7 @@ import json # Loading logging preferences -with open("logger.json", "r") as f: +with open("src/logger.json", "r") as f: dconf = json.load(f) # Establishing logger @@ -44,7 +44,7 @@ def host(): hash = dohash(hostcode) resp = redirect(url_for("play", hash=hash)) resp.set_cookie("_gid", str(hostcode)) - with open("templates/games.json", "r") as f: + with open("src/templates/games.json", "r") as f: tmp = json.load(f) games[hash] = tmp games[hash]["hostcode"] = hostcode @@ -57,7 +57,7 @@ def host(): session.permanent = True return resp - with open("templates/games.json", "r") as f: + with open("src/templates/games.json", "r") as f: tmp = json.load(f) default = [tmp["tossup"], tmp["bonus"], tmp["power"], tmp["negs"]] return render_template('host.html', title="Host Game", version=str(version), form=form, default=default)