#!/bin/bash

# Needed for envsubst to replace $ in final rendering
export DOLLSIGN=$

# Bash templating
cd /etc/nginx/templates
for tpl in * ; do
  envsubst < $tpl > /etc/nginx/conf.d/$tpl
done

# Nginx launch
nginx
