Postgres: changed image to the :alpine

All: Check if nginx config exists before updating. This is to prevent overwriting of certbot-auto certificates and redirect
This commit is contained in:
tanshu
2020-04-03 13:01:44 +05:30
parent 2c77fdd5a7
commit 518871ff16
5 changed files with 29 additions and 20 deletions

View File

@ -44,7 +44,6 @@
- "9000:9000"
volumes:
- /var/lib/nextcloud:/var/www/html
- /dev/urandom:/dev/urandom:ro
- name: Create webserver container
docker_container:
@ -58,20 +57,20 @@
volumes:
- /var/lib/nextcloud:/var/www/html:ro
- name: Check if Nginx conf file for gitea exists or not
- name: Check if Nginx conf file exists
stat: path="/etc/nginx/sites-available/{{ http_conf }}"
register: status
- name: No need to reload Nginx
debug: msg= {{ "No need to reload Nginx as sites-available entries have already been created" }}
- name: Sets Nginx conf file for gitea
- name: Set Nginx conf file
when: status.stat.exists == false
template:
src: "files/nginx.conf.j2"
dest: "/etc/nginx/sites-available/{{ http_conf }}"
- name: Enables new site
- name: Enable new site
when: status.stat.exists == false
file:
src: "/etc/nginx/sites-available/{{ http_conf }}"