Skip to content
Snippets Groups Projects
Commit e5657adf authored by Dennis Ahrens's avatar Dennis Ahrens
Browse files

Make nginx optional

parent b77d122d
No related branches found
No related tags found
No related merge requests found
......@@ -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.
postgrest_packages:
pkg.installed:
- pkgs: [nginx, postgresql-client]
- pkgs:
- postgresql-client
{% 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment