.
This commit is contained in:
+23
@@ -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
@@ -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
@@ -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
|
||||
Reference in New Issue
Block a user