Skip to content

Commit

Permalink
Add a dependency on postgresql.service to xsnippet-api.service
Browse files Browse the repository at this point in the history
xsnippet-api tries to connect to PostgreSQL on start and will fail
if it's not available. Declare this dependency in systemd, so that
the services always come up in the right order.
  • Loading branch information
malor committed Dec 23, 2024
1 parent ae50993 commit 64653f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roles/xsnippet_api/templates/systemd.service.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Unit]
Description = XSnippet API
After = network.target network-online.target
Wants = network-online.target
After = network.target network-online.target postgresql.service
Wants = network-online.target postgresql.service
StartLimitIntervalSec = 0

[Service]
Expand Down

0 comments on commit 64653f5

Please sign in to comment.