From fed6dc23d54b91d8e3d929a64148c68151e171a1 Mon Sep 17 00:00:00 2001 From: August Johnson Date: Sat, 5 Oct 2024 17:23:49 -0500 Subject: [PATCH] Slight adjustments to dockerfile. --- Dockerfile | 6 +++--- server/settings.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7616262c..b1986281 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,13 +7,13 @@ WORKDIR /opt/services/open5e-api # install our dependencies RUN pip install pipenv COPY . /opt/services/open5e-api -RUN pipenv install --system --deploy +RUN pipenv install --deploy # migrate the db, load content, and index it -RUN python manage.py quicksetup +RUN pipenv run python manage.py quicksetup # remove .env file (set your env vars via docker-compose.yml or your hosting provider) RUN rm .env #run gunicorn. -CMD ["gunicorn","-b", ":8888", "server.wsgi:application"] +CMD ["pipenv", "run", "gunicorn","-b", ":8888", "server.wsgi:application"] diff --git a/server/settings.py b/server/settings.py index dc832d42..8142daa5 100644 --- a/server/settings.py +++ b/server/settings.py @@ -23,7 +23,7 @@ # See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -assert "SECRET_KEY" in os.environ, "Set SECRET_KEY in your .env file!" +assert "SECRET_KEY" in os.environ, "Set SECRET_KEY in your .env or local OS!" SECRET_KEY = os.environ["SECRET_KEY"] # SECURITY WARNING: don't run with debug turned on in production!