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:
@ -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 }}"
|
||||
|
||||
Reference in New Issue
Block a user