Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 585f62fd authored by Arthur BOUDREAULT's avatar Arthur BOUDREAULT
Browse files

feat: add Docker Compose containers into YNH

parent 063f8b3d
No related branches found
No related tags found
1 merge request!49Draft: Resolve "feat: integrate containers into YunoHost"
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # # along with this program. If not, see <http://www.gnu.org/licenses/>. #
# # # #
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
# The list of Yunohost apps. # The list of Yunohost apps.
ynh_apps: null ynh_apps: null
# - label: Tiny Tiny RSS # - label: Tiny Tiny RSS
...@@ -31,3 +30,27 @@ ynh_apps: null ...@@ -31,3 +30,27 @@ ynh_apps: null
# type: script # type: script
# owner: ttrss # Only provide if different from app name # owner: ttrss # Only provide if different from app name
# group: ttrss # Only provide if different from www-data # group: ttrss # Only provide if different from www-data
# Variables for Docker
enable_ynh_docker: false
geerlingguy_docker_version: 5.2.1
# Variables for Docker Compose
docker_compose_src_template: templates/compose.yml.j2
# docker_compose_dest_template: /tmp/compose.yml
# docker_compose_version: 3.9
# docker_compose_apps:
# - name: app1
# image: "recordsansible/ara-api:latest"
# ports:
# - "8000:8000"
# volumes:
# - "/home/{{ ynh_admin }}/.ara/server:/opt/ara"
# environment:
# - DEBUG=1
# - name: app2
# image: "alpine:latest"
# ports: null
# volumes: null
# environment: null
---
#-----------------------------------------------------------------------------#
# ansible-yunohost allows to deploy Yunohost using Ansible #
# Copyright 2021-present Lydra https://www.lydra.fr/ #
# #
# this program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# this program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
#-----------------------------------------------------------------------------#
- name: Download Docker setup role on localhost
ansible.builtin.command: "ansible-galaxy install geerlingguy.docker,{{ geerlingguy_docker_version }} -p {{ _ansible_role_directory }}"
delegate_to: localhost
become: false
changed_when: false
tags: docker
- name: Gather facts for Docker role
ansible.builtin.setup:
tags: docker
- name: Install Docker and Docker Compose
ansible.builtin.import_role:
name: geerlingguy.docker
tags: docker
- name: Copy Docker Compose file
ansible.builtin.template:
src: "{{ docker_compose_src_template }}"
dest: "{{ docker_compose_dest_template }}"
mode: 0644
tags: docker
- name: Run Docker Compose file
community.docker.docker_compose:
project_src: "{{ docker_compose_dest_template }}"
state: present
tags: docker
...@@ -17,8 +17,12 @@ ...@@ -17,8 +17,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # # along with this program. If not, see <http://www.gnu.org/licenses/>. #
# # # #
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
- name: Install Yunohost apps - name: Install Yunohost apps
ansible.builtin.include_tasks: apps.yml ansible.builtin.include_tasks: apps.yml
when: ynh_apps when: ynh_apps
tags: apps tags: apps
- name: Install Docker and redirect apps
ansible.builtin.include_tasks: docker.yml
when: enable_ynh_docker
tags: docker
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment