diff --git a/README.md b/README.md index 44cd40d784f12962b3f2f04749f534b1011a35bf..ce8ed22f61c2ce86a63a9bd545dbd951c72f2c0e 100644 --- a/README.md +++ b/README.md @@ -74,8 +74,10 @@ You can access your PostgREST instances at: - `apiv2.postgrest.local:4432` - `icmscache.postgrest.local:4432` -### SSL certificates +### nginx -Don't worry about this for the next 10 years. -Should this still be around and the certificate did expire just generate a new one with the `new_cert.sh` script in `.saltstack/pillar/sslcert/`. -Make sure to adjust the pillar data (`postrest.sls` in the same directory) with the newly generated data. +This formula is capable of installing and configuring nginx. +Therefore you need to have an `nginx` block below your instance configuration as +you can see in `pillar.example`. +If you omit this block the formula does not care about nginx. +This is useful, if you want to use the nginx formula. diff --git a/postgrest/common.sls b/postgrest/common.sls index e192eb30a4b0bbd384da20c76a13a31f8e565e0b..5882dc56fe8221c81db3e3a6e5831de0a907e652 100644 --- a/postgrest/common.sls +++ b/postgrest/common.sls @@ -1,3 +1,4 @@ postgrest_packages: pkg.installed: - - pkgs: [nginx, postgresql-client] + - pkgs: + - postgresql-client diff --git a/postgrest/nginx.sls b/postgrest/nginx.sls index 823c328af6f7e2fe9acee5f01476422461db5df3..a03710362e35c50a8fb659abdb003ee134da07bc 100644 --- a/postgrest/nginx.sls +++ b/postgrest/nginx.sls @@ -1,6 +1,11 @@ {% for instance_name, instance_conf in salt['pillar.get']("postgrest:instances").items() %} {% if instance_conf.nginx is defined %} +postgrest_nginx_package: + pkg.installed: + - pkgs: + - nginx + postgrest_{{ instance_name }}_nginx_conf: file.managed: - name: /etc/nginx/sites-available/{{ instance_name }}.conf