This commit is contained in:
Ross
2022-05-03 18:34:33 +01:00
parent 8781f288a2
commit 4e58899e54
3 changed files with 33 additions and 5 deletions
+23
View File
@@ -0,0 +1,23 @@
# pull official base image
FROM python:3.10.4-slim
# set work directory
WORKDIR /usr/src/rad
# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Numpy requriements
#RUN apk add --no-cache --update \
# python3 python3-dev gcc \
# gfortran musl-dev \
# libffi-dev openssl-dev
# install dependencies
RUN pip install --upgrade pip
COPY ./requirements.txt .
RUN pip install -r requirements.txt
# copy project
COPY . .
+7 -3
View File
@@ -19,11 +19,15 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
with open("/etc/secret_key") as f:
SECRET_KEY = f.read().strip()
try:
with open("/etc/secret_key") as f:
SECRET_KEY = f.read().strip()
except:
SECRET_KEY = os.environ.get("SECRET_KEY")
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = int(os.environ.get("DEBUG", default=0))
ALLOWED_HOSTS = [
"localhost",
+3 -2
View File
@@ -1,4 +1,4 @@
Django
Django==3.2.13
django_debug_toolbar
django_jquery
django_reversion
@@ -24,4 +24,5 @@ pymemcache
django-autocomplete-light
django-querysetsequence
dicognito
django_unused_media
django_unused_media
gunicorn