From e118b3087395793a19fe71455cd3b4a7f02ea4c2 Mon Sep 17 00:00:00 2001 From: Jesper Hess Nielsen Date: Sat, 2 Mar 2019 19:24:42 +0100 Subject: [PATCH] Deploy https://data.coop as a container --- playbook.yml | 3 ++- roles/docker/defaults/main.yml | 6 +++++- roles/docker/tasks/services/website.yml | 12 ++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 roles/docker/tasks/services/website.yml diff --git a/playbook.yml b/playbook.yml index a24d717..ea2c278 100644 --- a/playbook.yml +++ b/playbook.yml @@ -21,6 +21,7 @@ - codimd - netdata - docker_registry + - website smtp_host: postfix smtp_port: 587 @@ -29,4 +30,4 @@ - import_role: name: ubuntu_base - import_role: - name: docker + name: docker \ No newline at end of file diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml index e3b245c..7ad3094 100644 --- a/roles/docker/defaults/main.yml +++ b/roles/docker/defaults/main.yml @@ -39,4 +39,8 @@ netdata: docker_registry: domain: "docker.{{ base_domain }}" volume_folder: "{{ volume_root_folder }}/docker-registry" - \ No newline at end of file + username: "docker" + password: "{{ docker_password }}" + +website: + domain: "{{ base_domain }}" diff --git a/roles/docker/tasks/services/website.yml b/roles/docker/tasks/services/website.yml new file mode 100644 index 0000000..bb50a60 --- /dev/null +++ b/roles/docker/tasks/services/website.yml @@ -0,0 +1,12 @@ +--- + +- name: setup data.coop website docker container + docker_container: + name: website + image: docker.data.coop/data-coop-website + networks: + - name: external_services + env: + VIRTUAL_HOST : "{{ website.domain }}" + LETSENCRYPT_HOST: "{{ website.domain }}" + LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"