data.coop-ansible/roles/docker/tasks/services/websites/data.coop.yml

38 lines
1.5 KiB
YAML
Raw Normal View History

# vim: ft=yaml.ansible
---
- name: Upload vhost config for root domain
copy:
2022-12-07 20:51:51 +00:00
src: files/configs/matrix/vhost-root
2023-07-26 15:03:33 +00:00
dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.data_coop_website.domain }}"
- name: Upload vhost config for WWW domain
copy:
src: files/configs/vhost-www
2023-07-26 15:03:33 +00:00
dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.data_coop_website.www_domain }}"
- name: setup data.coop website docker container
docker_container:
2023-07-26 15:03:33 +00:00
name: "{{ services.data_coop_website.domain }}_website"
image: docker.data.coop/data-coop-website:{{ services.data_coop_website.version }}
2023-07-26 15:15:35 +00:00
pull: true
restart_policy: unless-stopped
networks:
- name: external_services
env:
2023-07-26 15:03:33 +00:00
VIRTUAL_HOST: "{{ services.data_coop_website.domain }},{{ services.data_coop_website.www_domain }}"
LETSENCRYPT_HOST: "{{ services.data_coop_website.domain }},{{ services.data_coop_website.www_domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
- name: setup staging data.coop website using hugo
docker_container:
2023-07-26 15:03:33 +00:00
name: "{{ services.data_coop_website.staging_domain }}_website"
image: docker.data.coop/data-coop-website:{{ services.data_coop_website.staging_version }}
2023-07-26 15:15:35 +00:00
pull: true
restart_policy: unless-stopped
networks:
- name: external_services
env:
2023-07-26 15:03:33 +00:00
VIRTUAL_HOST: "{{ services.data_coop_website.staging_domain }}"
LETSENCRYPT_HOST: "{{ services.data_coop_website.staging_domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"