diff --git a/infrastructure/ansible/compose.monitoring.yaml.j2 b/infrastructure/ansible/compose.monitoring.yaml.j2 index 3bceb7b..ee84e61 100644 --- a/infrastructure/ansible/compose.monitoring.yaml.j2 +++ b/infrastructure/ansible/compose.monitoring.yaml.j2 @@ -99,11 +99,11 @@ volumes: networks: frontend_network: - driver: bridge + external: true backend_network: - driver: bridge + external: true monitoring_network: - driver: bridge + external: true diff --git a/infrastructure/ansible/playbook.yaml b/infrastructure/ansible/playbook.yaml index 70677b4..c05e0b6 100644 --- a/infrastructure/ansible/playbook.yaml +++ b/infrastructure/ansible/playbook.yaml @@ -80,6 +80,10 @@ dest: /opt/monitoring_app become: false + - name: Create external docker networks + command: docker network create frontend_network backend_network monitoring_network + ignore_errors: true + - name: Stop and remove existing containers along with volumes(when force restart is true) command: docker compose -f compose.monitoring.yaml down --volumes args: