use eumau/roundcube image + nginx auto config

This commit is contained in:
Mauro Torrez 2019-10-01 22:52:37 -03:00
parent e5507857df
commit d66cd019d6
2 changed files with 13 additions and 23 deletions

View File

@ -4,7 +4,7 @@ roundcube_domain: default
roundcube_web_root: /roundcube
# container
roundcube_image: roundcube/roundcubemail
roundcube_image: eumau/roundcubemail
roundcube_container: roundcube
roundcube_volume: roundcube

View File

@ -66,28 +66,18 @@
- name: "{{ docker_network_name }}"
ports:
- name: template nginx domain config
when: roundcube_domain != 'default'
include_role:
name: nginx-docker
tasks_from: domain.yml
vars:
ng_domain_name: "{{ roundcube_domain }}"
- name: template nginx location config
include_role:
name: nginx-docker
tasks_from: location.yml
vars:
ng_domain_name: "{{ roundcube_domain }}"
ng_location_name: "{{ roundcube_web_root }}"
ng_location_content: |
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://{{ roundcube_container }}/;
- meta: flush_handlers
- name: export nginx config
set_fact:
nginx_config: >-
{{ nginx_config | default({}) | combine({
roundcube_domain: {
"locations": {
roundcube_web_root: {
"proxy_pass": "http://{}:9000/".format(roundcube_container)
}
}
}
}) }}
- name: inspect roundcube volume
docker_volume_info: