first commit
Some checks failed
CI/CD Pipeline / Run Tests (push) Failing after 0s
CI/CD Pipeline / Code Quality Checks (push) Failing after 1m43s
CI/CD Pipeline / Build Docker Images (push) Has been skipped
CI/CD Pipeline / Push to Gitea Registry (push) Has been skipped

This commit is contained in:
2026-01-21 12:07:35 +01:00
commit e9d7f24aaa
102 changed files with 13890 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
[Unit]
Description=Celery Beat for Django project
After=network.target redis.service postgresql.service
[Service]
Type=simple
User=www-data
Group=www-data
EnvironmentFile=/var/www/project/.env
WorkingDirectory=/var/www/project/src
ExecStart=/var/www/project/venv/bin/celery -A config beat --loglevel=INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler
Restart=always
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,16 @@
[Unit]
Description=Celery Worker for Django project
After=network.target redis.service postgresql.service
[Service]
Type=forking
User=www-data
Group=www-data
EnvironmentFile=/var/www/project/.env
WorkingDirectory=/var/www/project/src
ExecStart=/var/www/project/venv/bin/celery -A config worker --loglevel=INFO --pidfile=/run/celery/worker.pid
ExecReload=/bin/kill -HUP $MAINPID
PIDFile=/run/celery/worker.pid
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,27 @@
[Unit]
Description=Gunicorn daemon for Django project
After=network.target
[Service]
Type=notify
User=www-data
Group=www-data
RuntimeDirectory=gunicorn
WorkingDirectory=/var/www/project/src
ExecStart=/var/www/project/venv/bin/gunicorn config.wsgi:application \
--bind unix:/run/gunicorn.sock \
--workers 3 \
--worker-class gevent \
--worker-connections 1000 \
--timeout 30 \
--keep-alive 2 \
--max-requests 1000 \
--max-requests-jitter 100 \
--preload
ExecReload=/bin/kill -s HUP $MAINPID
KillMode=mixed
TimeoutStopSec=5
PrivateTmp=true
[Install]
WantedBy=multi-user.target