Compare commits

..

No commits in common. "615d4e59c6bb8807933dda285f34dc11c2ab9867" and "c9b2d5bd8d709b39e7855e628524d357447567f2" have entirely different histories.

5 changed files with 7 additions and 16 deletions

View File

@ -1,11 +1,3 @@
## Unreleased
* Fix collectstaticfiles causing error when restarting container (https://git.kucharczyk.xyz/lukas/timetracker/issues/23)
## 0.1.3 / 2023-01-08 15:23+01:00
* Fix CSRF error (https://git.kucharczyk.xyz/lukas/timetracker/pulls/22)
## 0.1.2 / 2023-01-07 22:05+01:00
* Switch to Uvicorn/Gunicorn + Caddy (https://git.kucharczyk.xyz/lukas/timetracker/pulls/4)

View File

@ -6,7 +6,7 @@ RUN npm install && \
FROM python:3.10.9-alpine
ENV VERSION_NUMBER 0.1.2-3-g83f075e
ENV VERSION_NUMBER 0.1.2
ENV PROD 1
RUN apk add \

View File

@ -44,7 +44,7 @@ shell:
poetry run python src/web/manage.py shell
collectstatic:
poetry run python src/web/manage.py collectstatic -c --no-input
poetry run python src/web/manage.py collectstatic
poetry.lock: pyproject.toml
poetry install

View File

@ -5,7 +5,7 @@ echo "Apply database migrations"
poetry run python src/web/manage.py migrate
echo "Collect static files"
poetry run python src/web/manage.py collectstatic --clear --no-input
poetry run python src/web/manage.py collectstatic
echo "Starting server"
caddy start

View File

@ -145,8 +145,7 @@ LOGGING = {
},
}
_csrf_trusted_origins = os.environ.get("CSRF_TRUSTED_ORIGINS")
if _csrf_trusted_origins:
CSRF_TRUSTED_ORIGINS = _csrf_trusted_origins.split(",")
else:
CSRF_TRUSTED_ORIGINS = []
if os.environ.get("PROD"):
CSRF_TRUSTED_ORIGINS.append(os.environ.get("CSRF_TRUSTED_ORIGINS"))