Commit 89284d84 authored by Joachim Kołodziejski's avatar Joachim Kołodziejski
Browse files

Add missing 'reports' task to entrypoint.sh and README.md, add CHANNELS_REDIS_URL to sample.env

parent e4920035
Loading
Loading
Loading
Loading
+2 −2
Changes for README.md: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ Voting system, initially developed for [XIV LO in Warsaw](https://staszic.waw.pl
    User=wybory
    Group=wybory
    WorkingDirectory=/var/www/wybory
    ExecStart=/var/www/wybory/.venv/bin/python manage.py rqworker default email email_batch --job-class django_tasks_rq.Job
    ExecStart=/var/www/wybory/.venv/bin/python manage.py rqworker default email email_batch reports --job-class django_tasks_rq.Job
    StandardOutput=file:/var/log/wybory/worker_stdout.log
    StandardError=file:/var/log/wybory/worker_stderr.log
    Restart=always
@@ -90,4 +90,4 @@ Voting system, initially developed for [XIV LO in Warsaw](https://staszic.waw.pl
- create a superuser `sudo -u wybory uv run python manage.py createsuperuser`
- serve the traffic through a reverse proxy

To upgrade, pull the latest changes, install new dependencies (`sudo -u wybory uv sync --locked`), adjust the config if the new version requires it and restart the service.
To upgrade, pull the latest changes, install new dependencies (`sudo -u wybory uv sync --locked`), adjust the configs if the new version requires it and restart the service.
+1 −1
Changes for entrypoint.sh: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ if [ "$1" = "web" ]; then
    fi
    gunicorn -c gunicorn.conf.py wybory.asgi
elif [ "$1" = "worker" ]; then
    ./manage.py rqworker default email email_batch --job-class django_tasks_rq.Job
    ./manage.py rqworker default email email_batch reports --job-class django_tasks_rq.Job
else
    echo "Invalid command $1."
    exit 1
+5 −2
Changes for sample.env: 5 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -27,8 +27,11 @@ ALLOWED_HOSTS="wybory.example.com"
# Comma-separated allowed CSRF Origins (see Django settings CSRF_TRUSTED_ORIGINS)
CSRF_TRUSTED_ORIGINS="https://wybory.example.com"

# Redis instance URL (see django-rq RQ_QUEUES)
RQ_URL="redis://localhost:6379/0"
# Redis instance URL for queues (see django-rq RQ_QUEUES)
#RQ_URL="redis://localhost:6379/0"

# Redis instance URL for channels (see channels CHANNEL_LAYERS)
#CHANNELS_REDIS_URL="redis://localhost:6379/1"

# Timezone in IANA notation (see Django settings TIME_ZONE)
#TIME_ZONE="Etc/UTC"