From 677fdd7f51a4b382aad09a24ddb7a25ca0d24fe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Dybiec?= Date: Wed, 17 Apr 2019 17:37:41 +0200 Subject: Inline counter app config --- composer/app/docker-compose.yml | 10 ---------- docker.yml | 19 ++++++++++++++++--- 2 files changed, 16 insertions(+), 13 deletions(-) delete mode 100644 composer/app/docker-compose.yml diff --git a/composer/app/docker-compose.yml b/composer/app/docker-compose.yml deleted file mode 100644 index e2225be..0000000 --- a/composer/app/docker-compose.yml +++ /dev/null @@ -1,10 +0,0 @@ -version: '3' -services: - web: - build: . - ports: - - "127.0.0.1:5004:5000" - restart: always - redis: - image: "redis:alpine" - restart: always diff --git a/docker.yml b/docker.yml index 769356d..47ae3ad 100644 --- a/docker.yml +++ b/docker.yml @@ -2,14 +2,27 @@ - name: Docker apps hosts: tamriel remote_user: ansible_worker + vars: + docker_compose_dir: "~/composer" tasks: - name: Synchronize docker-compose files synchronize: src: composer/ dest: composer - - name: counter app + - name: Counter app docker_service: - project_src: composer/app + project_name: app + definition: + version: '3' + services: + web: + build: "{{docker_compose_dir}}/app" + ports: + - "127.0.0.1:5004:5000" + restart: always + redis: + image: "redis:alpine" + restart: always - name: nginx docker_service: project_src: composer/nginx @@ -91,7 +104,7 @@ extra_hosts: - "dockerhost:172.17.0.1" volumes: - - "~/composer/monitoring/prometheus:/etc/prometheus/:ro" + - "{{docker_compose_dir}}/monitoring/prometheus:/etc/prometheus/:ro" restart: always cadvisor: image: google/cadvisor -- cgit v1.2.3