moved settings from devel to production

This commit is contained in:
2026-04-14 13:46:51 +02:00
parent d481b8ee0e
commit c08bdc3384
3 changed files with 17 additions and 8 deletions
+4 -6
View File
@@ -2,9 +2,8 @@
FROM python:3.13-alpine
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
RUN apk add --no-cache sqlite
# Create the app directory
#RUN mkdir /app
# Set the working directory inside the container
WORKDIR /app
@@ -20,10 +19,6 @@ RUN adduser \
# Set environment variables
## Django
# Allow all hosts
ENV DJANGO_ALLOWED_HOSTS=*
## Python
# Prevents Python from writing pyc files to disk
ENV PYTHONDONTWRITEBYTECODE=1
@@ -61,5 +56,8 @@ EXPOSE 8000
# Switch to the non-privileged user to run the application.
USER appuser
# Allow all hosts
ENV DJANGO_ALLOWED_HOSTS=*
# Run Djangos development server
CMD ["uv", "run", "manage.py", "runserver", "0.0.0.0:8000"]
+11
View File
@@ -1,3 +1,14 @@
# Build new container
podman build . -t he-database
podman tag he-database gitea.pkm.physik.tu-darmstadt.de/markusro/he-database:latest
podman push gitea.pkm.physik.tu-darmstadt.de/markusro/he-database:latest
# Run and update container
Also check documentation from [RedHat](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux_atomic_host/7/html/managing_containers/running_containers_as_systemd_services_with_podman).
podman pull gitea.pkm.physik.tu-darmstadt.de/markusro/he-database:latest
podman run --replace --detach --name he-database -p 8000:8000 he-database:latest
# Create DB Schema in chartdb.io
1. go to https://app.chartdb.io
+2 -2
View File
@@ -23,9 +23,9 @@ BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = 'django-insecure-qsqw7#kmvlyc1ou5emdh8^_bqnvp+hui(4w#1yy4ui82+p=%p*'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = False
ALLOWED_HOSTS = []
ALLOWED_HOSTS = ["*"]
# Application definition