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