supabase-postgres.git / summary / log / commit / refs

commit    f02eade2ac81156c4e468407153d6c0c8e59b222
Author:   Beng Eu <beng@bengeu.com>
Date:     Thu Feb 29 02:54:04 2024 +0000

    fix: ensure that Kong service is stopped before Envoy service is started
    
    Per https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#Before=, "Given two units with any ordering dependency between them, if one unit is shut down and the other is started up, the shutdown is ordered before the start-up. It doesn't matter if the ordering dependency is After= or Before=, in this case. It also doesn't matter which of the two is shut down, as long as one is shut down and the other is started up; the shutdown is ordered before the start-up in all cases. If two units have no ordering dependencies between them, they are shut down or started up simultaneously, and no ordering takes place."
    
    Also ensures that Envoy will take priority over Kong on reboot if both are enabled.


ansible/files/kong_config/kong.service.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible/files/kong_config/kong.service.j2 b/ansible/files/kong_config/kong.service.j2 index 29d7265a..6a36520b 100644 --- a/ansible/files/kong_config/kong.service.j2 +++ b/ansible/files/kong_config/kong.service.j2 @@ -4,6 +4,9 @@ After=postgrest.service gotrue.service adminapi.service Wants=postgrest.service gotrue.service adminapi.service Conflicts=envoy.service +# Ensures that Kong service is stopped before Envoy service is started +Before=envoy.service + [Service] Type=forking ExecStart=/usr/local/bin/kong start -c /etc/kong/kong.conf [parent: 7942c6868219]