diff --git a/plays/postdeploy/lib/nginxd.yml b/plays/postdeploy/lib/nginxd.yml new file mode 100644 index 0000000..d53ab5a --- /dev/null +++ b/plays/postdeploy/lib/nginxd.yml @@ -0,0 +1,24 @@ +--- +- name: Create nginx customisation directory + become: true + file: + path: "/home/dokku/{{ app }}/nginx.conf.d/" + state: directory + owner: dokku + group: dokku + +- name: Copy over the nginx custom configuration + become: true + template: + src: "{{ item }}" + dest: "/home/dokku/{{ app }}/nginx.conf.d/{{ item }}" + owner: dokku + group: dokku + with_fileglob: + - "{{ app_config_root }}/nginx.d/*.conf" + +- name: Reload nginx to enable custom configurations + become: true + service: + name: nginx + state: reloaded diff --git a/plays/postdeploy/postdeploy.yml b/plays/postdeploy/postdeploy.yml index 16b3dc5..330690a 100644 --- a/plays/postdeploy/postdeploy.yml +++ b/plays/postdeploy/postdeploy.yml @@ -6,3 +6,4 @@ - include: ./lib/http.yml - include: ./lib/https.yml - include: ./lib/proxy.yml + - include: ./lib/nginxd.yml