docker_compose_stack

ansible-role-docker-compose-stack

Роль Ansible, которая настраивает стек docker-compose с помощью systemd.

Использование

requirements.yml:

---
- src: aklinkert.docker_compose_stack

group_vars/fah.yml:

fah_docker_compose_stack_file: |
  version: '3.5'
  services:
    fah:
      image: johnktims/folding-at-home:latest
      restart: always
      ports:
        - "127.0.0.1:7396:7396"
      devices:
        - "/dev/nvidia0:/dev/nvidia0"
        - "/dev/nvidiactl:/dev/nvidiactl"
        - "/dev/nvidia-uvm:/dev/nvidia-uvm"
      command:
        - "--user={{ fah_name }}"
        - "--team={{ fah_team }}"
        - "--power=full"

fah_docker_compose_stack_create_files:
  - name: file.txt
    mode: "0600"

fah_docker_compose_stack_additional_files:
  - name: file_content.txt
    content: |
      test-content

playbook.yml:

- name: Установить сервис docker-compose
  hosts: fah
  become: true
  roles:
    - role: aklinkert.docker_compose
      vars:
        docker_compose_stack_name: fah
        docker_compose_stack_file: "{{ fah_docker_compose_stack_file }}"
        docker_compose_stack_additional_files: "{{ fah_docker_compose_stack_additional_files }}"
        docker_compose_stack_create_files: "{{ fah_docker_compose_stack_create_files }}"

Лицензия

Apache v2.0

О проекте

Role to configure a docker-compose stack with systemd on Debian/Ubuntu.

Установить
ansible-galaxy install aklinkert/ansible-role-docker-compose
Лицензия
apache-2.0
Загрузки
57
Владелец
Cloud Software and Infrastructure Architect