Make sure systemd doesn't try to start NetBox before Redis is ready

In some cases Redis will take some seconds to become ready.
If NetBox is started with systemd unit file before Redis is ready it will fail with an error.

Changing the After/Wants to redis.service will make sure NetBox start is not attempted before Redis signals it is ready. This needs in "supervised systemd" in redis.conf.
This commit is contained in:
bluikko 2020-04-15 13:42:21 +07:00 committed by GitHub
parent 788909de94
commit b2409e5446
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,8 @@
[Unit]
Description=NetBox WSGI Service
Documentation=https://netbox.readthedocs.io/en/stable/
After=network-online.target
Wants=network-online.target
After=redis.service
Wants=redis.service
[Service]
Type=simple