1
0
Fork 0

ansible: use 'compose' module, gaining support for check-mode etc.

This commit is contained in:
Julian Foad 2024-10-18 16:28:58 +01:00
parent b86a3a7a5a
commit 8b1e9a0ee5
2 changed files with 10 additions and 4 deletions

View file

@ -6,5 +6,8 @@
template: src="docker-compose.yml.j2" dest="{{ qux_home }}/docker-compose.yml"
- name: "docker compose up"
command:
cmd: "docker compose --project-directory={{ qux_home }} up --remove-orphans -d"
community.docker.docker_compose_v2:
project_src: "{{ qux_home }}"
#project_name: "{{ qux_home|basename }}"
pull: "{{ 'always' if qux_pull|default(false) else omit }}"
remove_orphans: true

View file

@ -1,12 +1,13 @@
version: '3'
---
services:
mongo:
restart: always
container_name: quant-ux-mongo
image: "{{ qux_docker_image_mongo }}"
volumes:
- ./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:
restart: always
container_name: quant-ux-frontend
@ -30,6 +31,7 @@ services:
{% endif %}
depends_on:
- qux-be
qux-be:
restart: always
container_name: quant-ux-backend
@ -52,6 +54,7 @@ services:
- TZ={{ tz }}
depends_on:
- mongo
qux-ws:
restart: always
container_name: quant-ux-websocket-server