moved settings from devel to production
This commit is contained in:
+4
-6
@@ -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 Django’s development server
|
||||
CMD ["uv", "run", "manage.py", "runserver", "0.0.0.0:8000"]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user