From 29abd3382c92acc82d3286be91cd8864b363be4a Mon Sep 17 00:00:00 2001 From: Meutel Date: Sun, 15 Sep 2019 16:55:25 +0200 Subject: [PATCH] WIP: ansible deploy branch --- .ansible/deploy-draft.yml | 21 +++++++++++++++++++++ .drone.yml | 4 ++++ 2 files changed, 25 insertions(+) create mode 100644 .ansible/deploy-draft.yml diff --git a/.ansible/deploy-draft.yml b/.ansible/deploy-draft.yml new file mode 100644 index 0000000..9c3cab2 --- /dev/null +++ b/.ansible/deploy-draft.yml @@ -0,0 +1,21 @@ +--- +- hosts: docker + tasks: + - name: deploy draft + docker_container: + name: "bouquins_draft_{{ draft_name }}" + image: "reg.meutel.net/go-bouquins:{{ draft_name }}" + state: present + recreate: yes + labels: + traefik.enable: true + traefik.port: 8080 + traefik.docker.network: proxybackend + traefik.frontend.rule: "Host:{{ draft_name }}.bouquins.www.meutel.net" + networks: + name: proxybackend + # TODO volumes + volumes_from: + - mydata + +# vim:ft=ansible: diff --git a/.drone.yml b/.drone.yml index 3bb0383..c665a0c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -54,6 +54,10 @@ steps: branch: - feature/* + - name: deploy-branch + # TODO ansible + image: reg.meutel.net/go-bouquins:${DRONE_BRANCH##feature/} + trigger: event: - push