restored from the fool's errand that was WSL virtualization

This commit is contained in:
Disco DeDisco
2026-01-06 13:57:34 -05:00
parent 18d28600c9
commit b2fe1c0d52
3 changed files with 7 additions and 2 deletions

View File

@@ -14,4 +14,7 @@ RUN python manage.py collectstatic
ENV DJANGO_DEBUG_FALSE=1 ENV DJANGO_DEBUG_FALSE=1
RUN adduser --uid 1234 nonroot
# USER nonroot
CMD ["gunicorn", "--bind", ":8888", "core.wsgi:application"] CMD ["gunicorn", "--bind", ":8888", "core.wsgi:application"]

0
container.db.sqlite3 Normal file
View File

View File

@@ -25,12 +25,14 @@ BASE_DIR = Path(__file__).resolve().parent.parent
if 'DJANGO_DEBUG_FALSE' in os.environ: if 'DJANGO_DEBUG_FALSE' in os.environ:
DEBUG = False DEBUG = False
SECRET_KEY = os.environ['DJANGO_SECRET_KEY'] SECRET_KEY = os.environ['DJANGO_SECRET_KEY']
ALLOWED_HOSTS = [os.environ["DJANGO_ALLOWED_HOST"]] ALLOWED_HOSTS = [os.environ['DJANGO_ALLOWED_HOST']]
db_path = os.environ['DJANGO_DB_PATH']
else: else:
DEBUG = True DEBUG = True
# SECURITY WARNING: keep the secret key used in production secret! # SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-&9b_h=qpjy=sshhnsyg98&jp7(t6*v78__y%h2l$b#_@6z$-9r' SECRET_KEY = 'django-insecure-&9b_h=qpjy=sshhnsyg98&jp7(t6*v78__y%h2l$b#_@6z$-9r'
ALLOWED_HOSTS = [] ALLOWED_HOSTS = []
db_path = BASE_DIR / 'db.sqlite3'
# Application definition # Application definition
@@ -85,7 +87,7 @@ ASGI_APPLICATION = 'core.asgi.application'
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.sqlite3', 'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3', 'NAME': db_path,
} }
} }