31 lines
1.2 KiB
YAML
Raw Normal View History

2022-01-18 19:08:45 +01:00
---
2024-01-15 01:00:59 +01:00
# It is necessary to shut the projects down, when reset is activated.
# Otherwise it can lead to this bug:
# https://github.com/ansible/ansible/issues/10244
2024-01-20 12:46:07 +01:00
#- name: shut down docker compose project
# command:
# cmd: docker-compose -p "{{docker_compose_project_name}}" down
# listen: docker compose project setup
# when: mode_reset | bool
2024-01-15 01:00:59 +01:00
2025-01-17 17:26:52 +01:00
# default setup for docker compose files
- name: docker compose project setup
2022-01-18 19:08:45 +01:00
command:
cmd: docker-compose -p "{{docker_compose_project_name}}" up -d --force-recreate
2023-12-05 18:45:26 +01:00
chdir: "{{docker_compose_instance_directory}}"
2022-01-18 19:08:45 +01:00
environment:
2022-02-01 17:20:12 +01:00
COMPOSE_HTTP_TIMEOUT: 600
DOCKER_CLIENT_TIMEOUT: 600
2024-01-15 01:00:59 +01:00
listen: docker compose project setup
2025-01-17 17:26:52 +01:00
# it's necessary to rebuild when a build in the docker compose files is defined
# for performance reasons it's not recommended to use this if there is no build tag specified
- name: docker compose project build and setup
command:
cmd: docker-compose -p "{{docker_compose_project_name}}" up -d --force-recreate --build
chdir: "{{docker_compose_instance_directory}}"
environment:
COMPOSE_HTTP_TIMEOUT: 600
DOCKER_CLIENT_TIMEOUT: 600
listen: docker compose project setup