add a docker-compose task

This commit is contained in:
Andreas Zweili 2021-10-26 21:59:00 +02:00
parent 0fafa72b4b
commit 0f8c30a6c1
2 changed files with 10 additions and 2 deletions

View File

@ -35,11 +35,18 @@
- name: "Copy the project files to the server"
copy:
src: "{{ docker_project_name }}"
dest: "{{ lookup('env', 'HOME') }}/"
dest: "{{ docker_project_path }}/"
become: false
- name: "Copy the traefik config"
copy:
src: "traefik.yaml"
dest: "{{ lookup('env', 'HOME') }}/{{ docker_project_name }}/traefik.yaml"
dest: "{{ docker_project_path }}/traefik.yaml"
become: false
- name: "Start the Docker containers"
community.docker.docker_compose:
project_src: "{{ docker_project_path }}"
state: "present"
pull: "yes"
remove_orphans: "yes"

View File

@ -1 +1,2 @@
docker_lazydocker_version: 0.12
docker_project_path: "{{ lookup('env', 'HOME') }}/{{ docker_project_name }}"