forked from gtsatsis/authentik-bare-metal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
06_deploy.sh
35 lines (26 loc) · 928 Bytes
/
06_deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
tee /etc/systemd/system/authentik-server.service > /dev/null << EOF
[Unit]
Description = Authentik Server (web/api/sso)
[Service]
ExecStart=/bin/bash -c 'source /opt/authentik/src/.venv/bin/activate && python -m lifecycle.migrate && /opt/authentik/src/authentik-server'
WorkingDirectory=/opt/authentik/src
User=authentik
Group=authentik
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
tee /etc/systemd/system/authentik-worker.service > /dev/null << EOF
[Unit]
Description = Authentik Worker (background tasks)
[Service]
ExecStart=/bin/bash -c 'source /opt/authentik/src/.venv/bin/activate && celery -A authentik.root.celery worker -Ofair --max-tasks-per-child=1 --autoscale 3,1 -E -B -s /tmp/celerybeat-schedule -Q authentik,authentik_scheduled,authentik_events'
WorkingDirectory=/opt/authentik/src
User=authentik
Group=authentik
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF