forked from data.coop/ansible
Avoid code duplication
This commit is contained in:
parent
4d09c1ec11
commit
085bb1dfe7
|
@ -126,12 +126,11 @@ services:
|
||||||
|
|
||||||
data_coop_website:
|
data_coop_website:
|
||||||
file: websites/data.coop.yml
|
file: websites/data.coop.yml
|
||||||
domains:
|
domain: "{{ base_domain }}"
|
||||||
- "{{ base_domain }}"
|
www_domain: "www.{{ base_domain }}"
|
||||||
- "www.{{ base_domain }}"
|
|
||||||
version: stable
|
version: stable
|
||||||
staging_domain: "staging.{{ base_domain }}"
|
staging_domain: "staging.{{ base_domain }}"
|
||||||
staging_version: stable
|
staging_version: staging
|
||||||
|
|
||||||
slides_2022_website:
|
slides_2022_website:
|
||||||
file: websites/2022.slides.data.coop.yml
|
file: websites/2022.slides.data.coop.yml
|
||||||
|
|
|
@ -3,33 +3,33 @@
|
||||||
- name: Upload vhost config for root domain
|
- name: Upload vhost config for root domain
|
||||||
copy:
|
copy:
|
||||||
src: files/configs/matrix/vhost-root
|
src: files/configs/matrix/vhost-root
|
||||||
dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ base_domain }}"
|
dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.data_coop_website.domain }}"
|
||||||
|
|
||||||
- name: Upload vhost config for WWW domain
|
- name: Upload vhost config for WWW domain
|
||||||
copy:
|
copy:
|
||||||
src: files/configs/vhost-www
|
src: files/configs/vhost-www
|
||||||
dest: "{{ services.nginx_proxy.volume_folder }}/vhost/www.{{ base_domain }}"
|
dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.data_coop_website.www_domain }}"
|
||||||
|
|
||||||
- name: setup data.coop website docker container
|
- name: setup data.coop website docker container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: data.coop_website
|
name: "{{ services.data_coop_website.domain }}_website"
|
||||||
image: docker.data.coop/data-coop-website:{{ services.data_coop_website.version }}
|
image: docker.data.coop/data-coop-website:{{ services.data_coop_website.version }}
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- name: external_services
|
- name: external_services
|
||||||
env:
|
env:
|
||||||
VIRTUAL_HOST : "{{ services.data_coop_website.domains|join(',') }}"
|
VIRTUAL_HOST: "{{ services.data_coop_website.domain }},{{ services.data_coop_website.www_domain }}"
|
||||||
LETSENCRYPT_HOST: "{{ services.data_coop_website.domains|join(',') }}"
|
LETSENCRYPT_HOST: "{{ services.data_coop_website.domain }},{{ services.data_coop_website.www_domain }}"
|
||||||
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
||||||
|
|
||||||
- name: setup staging data.coop website using hugo
|
- name: setup staging data.coop website using hugo
|
||||||
docker_container:
|
docker_container:
|
||||||
name: staging.data.coop_website
|
name: "{{ services.data_coop_website.staging_domain }}_website"
|
||||||
image: docker.data.coop/data-coop-website:{{ services.data_coop_website.staging_version }}
|
image: docker.data.coop/data-coop-website:{{ services.data_coop_website.staging_version }}
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- name: external_services
|
- name: external_services
|
||||||
env:
|
env:
|
||||||
VIRTUAL_HOST : "{{ services.data_coop_website.staging_domain }}"
|
VIRTUAL_HOST: "{{ services.data_coop_website.staging_domain }}"
|
||||||
LETSENCRYPT_HOST: "{{ services.data_coop_website.staging_domain }}"
|
LETSENCRYPT_HOST: "{{ services.data_coop_website.staging_domain }}"
|
||||||
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
||||||
|
|
Loading…
Reference in a new issue