diff options
-rw-r--r-- | composer/app/docker-compose.yml | 10 | ||||
-rw-r--r-- | docker.yml | 19 |
2 files changed, 16 insertions, 13 deletions
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 @@ -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 |