Enable SSL
This commit is contained in:
@ -5,6 +5,13 @@
|
||||
mode: '0755'
|
||||
loop:
|
||||
- "{{ nginx_confd_folder }}"
|
||||
- name: copy certificates
|
||||
copy:
|
||||
src: "{{ item }}"
|
||||
dest: "{{ data_folder }}/nginx"
|
||||
loop:
|
||||
- localhost.key
|
||||
- localhost.crt
|
||||
- name: copy .conf file
|
||||
template:
|
||||
src: nginx.conf.j2
|
||||
@ -16,9 +23,12 @@
|
||||
image: nginx
|
||||
volumes:
|
||||
- "{{ data_folder }}/nginx/nginx.conf:/etc/nginx/nginx.conf"
|
||||
- "{{ data_folder }}/nginx/localhost.crt:/etc/nginx/localhost.crt"
|
||||
- "{{ data_folder }}/nginx/localhost.key:/etc/nginx/localhost.key"
|
||||
- "{{ nginx_confd_folder }}:/etc/nginx/conf.d"
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
env:
|
||||
NGINX_HOST: "{{ base_domain }}"
|
||||
NGINX_PORT: '80'
|
||||
|
Reference in New Issue
Block a user