From 1e1605958013a2d6fb51c28ed08580aa34788535 Mon Sep 17 00:00:00 2001 From: Amir Date: Wed, 28 Aug 2024 13:41:19 +0200 Subject: [PATCH] fixing sqlite --- .env | 1 + Dockerfile | 10 ++-------- Procfile | 1 + procfile | 1 - .../__pycache__/__init__.cpython-310.pyc | Bin 159 -> 148 bytes saburly/settings/getenv.py | 8 ++++++++ saburly/settings/production.py | 3 +++ 7 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 .env create mode 100644 Procfile delete mode 100644 procfile create mode 100644 saburly/settings/getenv.py diff --git a/.env b/.env new file mode 100644 index 00000000..491886e6 --- /dev/null +++ b/.env @@ -0,0 +1 @@ +SECRET_KEY = "django-insecure-4u__7o5r4h=k@qn_wk-h5$u_+bwo&gzvz5oph#+cny(#2wt6+)" diff --git a/Dockerfile b/Dockerfile index a39851be..b3cc5e4b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,6 @@ FROM python:3.8.1-slim-buster ENV PYTHONUNBUFFERED=1 -# Install system dependencies RUN apt-get update --yes && apt-get install --yes --no-install-recommends \ build-essential \ libpq-dev \ @@ -12,22 +11,17 @@ RUN apt-get update --yes && apt-get install --yes --no-install-recommends \ gettext \ && rm -rf /var/lib/apt/lists/* -# Add and set up the working directory WORKDIR /app -# Copy requirements file and install dependencies COPY requirements.txt /app/ RUN pip install --upgrade pip \ && pip install -r /app/requirements.txt -# Copy application code COPY . /app/ -# Collect static files RUN python manage.py collectstatic --noinput --clear +RUN python manage.py migrate --noinput -# Expose the port the app runs on EXPOSE 8000 -# Run the application server -CMD ["gunicorn", "--bind", "0.0.0.0:8000", "saburly.wsgi:application"] \ No newline at end of file +CMD ["gunicorn", "--bind", "0.0.0.0:8000", "saburly.wsgi:application"] diff --git a/Procfile b/Procfile new file mode 100644 index 00000000..5a48897c --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: gunicorn saburly.wsgi:application --bind 0.0.0.0:8000 diff --git a/procfile b/procfile deleted file mode 100644 index 8b9764f8..00000000 --- a/procfile +++ /dev/null @@ -1 +0,0 @@ -web: gunicorn saburly.wsgi:application --log-file - diff --git a/saburly/settings/__pycache__/__init__.cpython-310.pyc b/saburly/settings/__pycache__/__init__.cpython-310.pyc index 2461bc6780c1e89d36956ccf83778e8e57be859d..9b39c44581e098f5362b94d9e22610f16b1d1757 100644 GIT binary patch delta 42 wcmbQwIE9frpO=@50SK-zou9~UBW$jpk)NBYpO~9jr0R_pO=@50SK7e&P?RCk#o||$j?pHPt46M(sxNM&MwI>&@WC*DlN*XEKg0E H7-a