ansible: use 'compose' module, gaining support for check-mode etc.
This commit is contained in:
parent
b86a3a7a5a
commit
8b1e9a0ee5
2 changed files with 10 additions and 4 deletions
|
@ -6,5 +6,8 @@
|
||||||
template: src="docker-compose.yml.j2" dest="{{ qux_home }}/docker-compose.yml"
|
template: src="docker-compose.yml.j2" dest="{{ qux_home }}/docker-compose.yml"
|
||||||
|
|
||||||
- name: "docker compose up"
|
- name: "docker compose up"
|
||||||
command:
|
community.docker.docker_compose_v2:
|
||||||
cmd: "docker compose --project-directory={{ qux_home }} up --remove-orphans -d"
|
project_src: "{{ qux_home }}"
|
||||||
|
#project_name: "{{ qux_home|basename }}"
|
||||||
|
pull: "{{ 'always' if qux_pull|default(false) else omit }}"
|
||||||
|
remove_orphans: true
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
version: '3'
|
---
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
mongo:
|
mongo:
|
||||||
restart: always
|
restart: always
|
||||||
container_name: quant-ux-mongo
|
container_name: quant-ux-mongo
|
||||||
image: "{{ qux_docker_image_mongo }}"
|
image: "{{ qux_docker_image_mongo }}"
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/data/db # pth for the data to be stored and kept on your host machine is on the left side of the ":"
|
- ./data:/data/db # pth for the data to be stored and kept on your host machine is on the left side of the ":"
|
||||||
|
|
||||||
qux-fe:
|
qux-fe:
|
||||||
restart: always
|
restart: always
|
||||||
container_name: quant-ux-frontend
|
container_name: quant-ux-frontend
|
||||||
|
@ -30,6 +31,7 @@ services:
|
||||||
{% endif %}
|
{% endif %}
|
||||||
depends_on:
|
depends_on:
|
||||||
- qux-be
|
- qux-be
|
||||||
|
|
||||||
qux-be:
|
qux-be:
|
||||||
restart: always
|
restart: always
|
||||||
container_name: quant-ux-backend
|
container_name: quant-ux-backend
|
||||||
|
@ -52,6 +54,7 @@ services:
|
||||||
- TZ={{ tz }}
|
- TZ={{ tz }}
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongo
|
- mongo
|
||||||
|
|
||||||
qux-ws:
|
qux-ws:
|
||||||
restart: always
|
restart: always
|
||||||
container_name: quant-ux-websocket-server
|
container_name: quant-ux-websocket-server
|
||||||
|
|
Loading…
Reference in a new issue