mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-01-22 07:03:21 +01:00
31 lines
1.2 KiB
YAML
31 lines
1.2 KiB
YAML
---
|
|
# 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
|
|
#- 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
|
|
|
|
# default setup for docker compose files
|
|
- name: docker compose project setup
|
|
command:
|
|
cmd: docker-compose -p "{{docker_compose_project_name}}" up -d --force-recreate
|
|
chdir: "{{docker_compose_instance_directory}}"
|
|
environment:
|
|
COMPOSE_HTTP_TIMEOUT: 600
|
|
DOCKER_CLIENT_TIMEOUT: 600
|
|
listen: docker compose project setup
|
|
|
|
# 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
|