[WEB-5592] chore: add static files update settings for static files support (#8251)
* chore: add static files collection and update settings for static files support * chore: add WhiteNoise middleware for static file handling * chore(deps): upgrade WhiteNoise to version 6.11.0 and add static file reverse proxy in Caddyfile
This commit is contained in:
parent
f70384bff7
commit
4b59998e52
5 changed files with 8 additions and 1 deletions
|
|
@ -32,4 +32,7 @@ python manage.py create_bucket
|
||||||
# Clear Cache before starting to remove stale values
|
# Clear Cache before starting to remove stale values
|
||||||
python manage.py clear_cache
|
python manage.py clear_cache
|
||||||
|
|
||||||
|
# Collect static files
|
||||||
|
python manage.py collectstatic --noinput
|
||||||
|
|
||||||
exec gunicorn -w "$GUNICORN_WORKERS" -k uvicorn.workers.UvicornWorker plane.asgi:application --bind 0.0.0.0:"${PORT:-8000}" --max-requests 1200 --max-requests-jitter 1000 --access-logfile -
|
exec gunicorn -w "$GUNICORN_WORKERS" -k uvicorn.workers.UvicornWorker plane.asgi:application --bind 0.0.0.0:"${PORT:-8000}" --max-requests 1200 --max-requests-jitter 1000 --access-logfile -
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ INSTALLED_APPS = [
|
||||||
"django.contrib.auth",
|
"django.contrib.auth",
|
||||||
"django.contrib.contenttypes",
|
"django.contrib.contenttypes",
|
||||||
"django.contrib.sessions",
|
"django.contrib.sessions",
|
||||||
|
"django.contrib.staticfiles",
|
||||||
# Inhouse apps
|
# Inhouse apps
|
||||||
"plane.analytics",
|
"plane.analytics",
|
||||||
"plane.app",
|
"plane.app",
|
||||||
|
|
@ -58,6 +59,7 @@ INSTALLED_APPS = [
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
"corsheaders.middleware.CorsMiddleware",
|
"corsheaders.middleware.CorsMiddleware",
|
||||||
"django.middleware.security.SecurityMiddleware",
|
"django.middleware.security.SecurityMiddleware",
|
||||||
|
"whitenoise.middleware.WhiteNoiseMiddleware",
|
||||||
"plane.authentication.middleware.session.SessionMiddleware",
|
"plane.authentication.middleware.session.SessionMiddleware",
|
||||||
"django.middleware.common.CommonMiddleware",
|
"django.middleware.common.CommonMiddleware",
|
||||||
"django.middleware.csrf.CsrfViewMiddleware",
|
"django.middleware.csrf.CsrfViewMiddleware",
|
||||||
|
|
|
||||||
BIN
apps/api/plane/static/logos/Logo.png
Normal file
BIN
apps/api/plane/static/logos/Logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
|
|
@ -21,7 +21,7 @@ celery==5.4.0
|
||||||
django_celery_beat==2.6.0
|
django_celery_beat==2.6.0
|
||||||
django-celery-results==2.5.1
|
django-celery-results==2.5.1
|
||||||
# file serve
|
# file serve
|
||||||
whitenoise==6.6.0
|
whitenoise==6.11.0
|
||||||
# fake data
|
# fake data
|
||||||
faker==25.0.0
|
faker==25.0.0
|
||||||
# filters
|
# filters
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@
|
||||||
|
|
||||||
reverse_proxy /auth/* api:8000
|
reverse_proxy /auth/* api:8000
|
||||||
|
|
||||||
|
reverse_proxy /static/* api:8000
|
||||||
|
|
||||||
reverse_proxy /{$BUCKET_NAME}/* plane-minio:9000
|
reverse_proxy /{$BUCKET_NAME}/* plane-minio:9000
|
||||||
|
|
||||||
reverse_proxy /* web:3000
|
reverse_proxy /* web:3000
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue