Consul: Difference between revisions

imported>Zie
m formatting cleanup
Pigs (talk | contribs)
Consul: Use current channel for search.nixos.org link
Tags: Mobile edit Mobile web edit Advanced mobile edit
 
(2 intermediate revisions by 2 users not shown)
Line 8: Line 8:
</syntaxhighlight>
</syntaxhighlight>


But there are some [https://search.nixos.org/options?channel=20.09&from=0&size=30&sort=relevance&query=services.consul.|consul specific options] that might be useful.
But there are some [https://search.nixos.org/options?query=services.consul consul specific options] that might be useful.


Setting up Consul in a production setting is beyond the scope of this wiki, see the consul documentation for particulars.
Setting up Consul in a production setting is beyond the scope of this wiki, see the consul documentation for particulars.
One advice is that if you have systemd services depending on Consul via <code>After=consul.service</code>, you may want to switch consul service type no <code>notify</code>, to make sure that dependent services don't try to run until Consul is ready to accept connections:
<syntaxhighlight lang="nix">
  systemd.services.consul.serviceConfig.Type = "notify";
</syntaxhighlight>


== Consul-template ==
== Consul-template ==
Line 63: Line 69:
systemd.services.haproxy-config.enable = true;
systemd.services.haproxy-config.enable = true;
</syntaxhighlight>
</syntaxhighlight>
[[Category:Applications]]