Compare commits

..

2 commits

Author SHA1 Message Date
62e3cd13da
Prune DB task results 2024-10-01 21:28:24 +01:00
d211e2b27b
Replace gunicorn with granian
More rust is more good
2024-10-01 21:08:15 +01:00
7 changed files with 13 additions and 21 deletions

View file

@ -109,12 +109,6 @@ djlint:
script:
- djlint website/ --lint --check
gunicorn_check:
extends: .python_test_template
script:
- apt-get update && apt-get install --yes libpq-dev
- gunicorn --check-config --config etc/gunicorn.conf.py
npm_lint:
image: node:20-slim
stage: test

View file

@ -39,7 +39,14 @@ ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLA
RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz && tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz
ENV PATH=$VIRTUAL_ENV/bin:$PATH \
PYTHONUNBUFFERED=1
PYTHONUNBUFFERED=1 \
GRANIAN_INTERFACE=wsgi \
GRANIAN_HOST=0.0.0.0 \
GRANIAN_PORT=8080 \
GRANIAN_WORKERS_LIFETIME=1800 \
GRANIAN_RESPAWN_INTERVAL=10 \
GRANIAN_PROCESS_NAME=website \
GRANIAN_RESPAWN_FAILED_WORKERS=1
EXPOSE 8000

View file

@ -3,4 +3,5 @@
@daily ./manage.py update_unsplash_photos
@daily ./manage.py rebuild_references_index
@weekly ./manage.py refresh_spotify_playlists
@weekly ./manage.py prune_db_task_results
*/10 * * * * ./manage.py publish_scheduled_pages

View file

@ -1,10 +0,0 @@
wsgi_app = "website.wsgi:application"
disable_redirect_access_to_syslog = True
preload_app = True
bind = "127.0.0.1:8080"
max_requests = 1200
max_requests_jitter = 50
forwarded_allow_ips = "*"
# Run additional threads so the GIL isn't sitting completely idle
threads = 4

View file

@ -4,4 +4,4 @@ set -e
cd /app
exec gunicorn -c etc/gunicorn.conf.py
exec granian website.wsgi:application

View file

@ -20,7 +20,7 @@
},
"author": "Jake Howard",
"devDependencies": {
"eslint": "8.57.1",
"eslint": "8.55.0",
"eslint-plugin-unicorn": "49.0.0",
"prettier": "2.7.1",
"stylelint": "14.16.1",

View file

@ -7,7 +7,7 @@ beautifulsoup4[lxml]
requests
wagtail-generic-chooser==0.6
django-redis==5.4.0
gunicorn==22.0.0
granian[pname]==1.6.0
psycopg==3.1.18
djangorestframework
django-htmx==1.17.2
@ -28,7 +28,7 @@ django-proxy==1.2.2
wagtail-lite-youtube-embed==0.1.0
django-minify-html==1.7.1
metadata-parser==0.12.1
django-tasks==0.3.0
django-tasks==0.5.0
lightningcss==0.2.0
# DRF OpenAPI dependencies