Updated the web nginx.conf and the source is not given in the readme. Restricted to gondor. Webserver image and container names are now picked from the vars file.
29 lines
688 B
YAML
29 lines
688 B
YAML
---
|
|
# Tasks for Nextcloud webserver role
|
|
- name: Copy dockerfile
|
|
synchronize: src=web dest=/tmp
|
|
|
|
- name: Build nginx webserver image
|
|
docker_image:
|
|
name: "{{ web_container_image }}"
|
|
build:
|
|
path: /tmp/web/
|
|
dockerfile: /tmp/web/Dockerfile
|
|
pull: yes
|
|
state: present
|
|
source: build
|
|
force_source: yes
|
|
|
|
- name: Create webserver container
|
|
docker_container:
|
|
name: "{{ web_container_name }}"
|
|
image: "{{ web_container_image }}"
|
|
state: started
|
|
restart_policy: "unless-stopped"
|
|
links:
|
|
- "{{ container_name }}:app"
|
|
published_ports:
|
|
- "127.0.0.1:9080:80"
|
|
volumes:
|
|
- "/var/lib/{{ host_directory }}:/var/www/html:ro"
|