nixos/middleman: Wait for psql before starting nginx
This commit is contained in:
parent
01cb95de6d
commit
d0b155d786
@ -132,6 +132,10 @@ in
|
|||||||
|
|
||||||
systemd = {
|
systemd = {
|
||||||
network.networks."80-container-host0" = networkdAssignment "host0" assignments.internal;
|
network.networks."80-container-host0" = networkdAssignment "host0" assignments.internal;
|
||||||
|
services = {
|
||||||
|
# HACK: nginx seems to get stuck not being able to DNS early...
|
||||||
|
nginx = lib.my.systemdAwaitPostgres pkgs.postgresql "colony-psql";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
security = {
|
security = {
|
||||||
@ -234,6 +238,8 @@ in
|
|||||||
appendHttpConfig = ''
|
appendHttpConfig = ''
|
||||||
${baseHttpConfig}
|
${baseHttpConfig}
|
||||||
|
|
||||||
|
resolver_timeout 5s;
|
||||||
|
|
||||||
# caching
|
# caching
|
||||||
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=CACHE:10m inactive=7d max_size=4g;
|
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=CACHE:10m inactive=7d max_size=4g;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user