mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Huge role refactoring/cleanup. Other commits will propably follow. Because some bugs will exist. Still important for longrun and also for auto docs/help/slideshow generation
This commit is contained in:
19
templates/roles/web-app/README.md.j2
Normal file
19
templates/roles/web-app/README.md.j2
Normal file
@@ -0,0 +1,19 @@
|
||||
# Docker Role Template
|
||||
|
||||
This folder contains a template to setup docker roles.
|
||||
|
||||
## Description
|
||||
|
||||
* Put a description here.
|
||||
|
||||
## Overview
|
||||
|
||||
Put an overview here.
|
||||
|
||||
## Features
|
||||
|
||||
Put a feature list here
|
||||
|
||||
## Further Resources
|
||||
|
||||
* Put more resources here
|
20
templates/roles/web-app/meta/main.yml.j2
Normal file
20
templates/roles/web-app/meta/main.yml.j2
Normal file
@@ -0,0 +1,20 @@
|
||||
{% raw %}
|
||||
---
|
||||
galaxy_info:
|
||||
author: "Kevin Veen-Birkenbach"
|
||||
description: ""
|
||||
license: "CyMaIS NonCommercial License (CNCL)"
|
||||
license_url: "https://s.veen.world/cncl"
|
||||
company: |
|
||||
Kevin Veen-Birkenbach
|
||||
Consulting & Coaching Solutions
|
||||
https://www.veen.world
|
||||
galaxy_tags: []
|
||||
repository: "https://github.com/kevinveenbirkenbach/cymais"
|
||||
issue_tracker_url: "https://github.com/kevinveenbirkenbach/cymais/issues"
|
||||
documentation: "https://github.com/kevinveenbirkenbach/cymais/"
|
||||
logo:
|
||||
class: ""
|
||||
run_after: []
|
||||
dependencies: []
|
||||
{% endraw %}
|
0
templates/roles/web-app/meta/schema.yml.j2
Normal file
0
templates/roles/web-app/meta/schema.yml.j2
Normal file
38
templates/roles/web-app/tasks/main.yml.j2
Normal file
38
templates/roles/web-app/tasks/main.yml.j2
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
|
||||
{% if database_type | bool %}
|
||||
|
||||
{% raw %}
|
||||
- name: "include service-rdbms-central"
|
||||
include_role:
|
||||
name: service-rdbms-central
|
||||
when: run_once_docker_{% endraw %}{{ application_id }}{% raw %} is not defined
|
||||
|
||||
{% endraw %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% raw %}
|
||||
- name: "include docker-compose role"
|
||||
include_role:
|
||||
name: docker-compose
|
||||
when: run_once_docker_{% endraw %}{{ application_id }}{% raw %} is not defined
|
||||
{% endraw %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% raw %}
|
||||
|
||||
- name: "include role webserver-proxy-domain for {{application_id}}"
|
||||
include_role:
|
||||
name: webserver-proxy-domain
|
||||
vars:
|
||||
domain: "{{ domains | get_domain(application_id) }}"
|
||||
http_port: "{{ ports.localhost.http[application_id] }}"
|
||||
when: run_once_docker_{% endraw %}{{ application_id }}{% raw %} is not defined
|
||||
|
||||
- name: run the {% endraw %}{{ application_id }}{% raw %} tasks once
|
||||
set_fact:
|
||||
run_once_docker_{% endraw %}{{ application_id }}{% raw %}: true
|
||||
when: run_once_docker_{% endraw %}{{ application_id }}{% raw %} is not defined
|
||||
{% endraw %}
|
0
templates/roles/web-app/templates/Dockerfile.j2.j2
Normal file
0
templates/roles/web-app/templates/Dockerfile.j2.j2
Normal file
20
templates/roles/web-app/templates/docker-compose.yml.j2.j2
Normal file
20
templates/roles/web-app/templates/docker-compose.yml.j2.j2
Normal file
@@ -0,0 +1,20 @@
|
||||
{% raw %}
|
||||
services:
|
||||
|
||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||
|
||||
application:
|
||||
image: "{{ applications[application_id].images[application_id] }}"
|
||||
volumes: []
|
||||
ports:
|
||||
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}"
|
||||
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/depends_on/dmbs_excl.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
|
||||
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||
|
||||
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||
{% endraw %}
|
||||
|
0
templates/roles/web-app/templates/env.j2.j2
Normal file
0
templates/roles/web-app/templates/env.j2.j2
Normal file
1
templates/roles/web-app/templates/javascript.js.j2
Normal file
1
templates/roles/web-app/templates/javascript.js.j2
Normal file
@@ -0,0 +1 @@
|
||||
alert('Custom JS loaded');
|
29
templates/roles/web-app/vars/configuration.yml.j2
Normal file
29
templates/roles/web-app/vars/configuration.yml.j2
Normal file
@@ -0,0 +1,29 @@
|
||||
{% raw %}
|
||||
credentials: {}
|
||||
docker:
|
||||
images: {} # @todo Move under services
|
||||
versions: {} # @todo Move under services
|
||||
services:
|
||||
redis:
|
||||
enabled: false # Enable Redis
|
||||
database:
|
||||
enabled: false # Enable the database
|
||||
features:
|
||||
matomo: true # Enable Matomo Tracking
|
||||
css: true # Enable Global CSS Styling
|
||||
portfolio_iframe: true # Enable loading of app in iframe
|
||||
ldap: false # Enable LDAP Network
|
||||
central_database: false # Enable Central Database Network
|
||||
recaptcha: false # Enable ReCaptcha
|
||||
oauth2: false # Enable the OAuth2-Proy
|
||||
javascript: false # Enables the custom JS in the javascript.js.j2 file
|
||||
csp:
|
||||
whitelist: {} # URL's which should be whitelisted
|
||||
flags: {} # Flags which should be set
|
||||
domains:
|
||||
canonical: {} # Urls under which the domain should be directly accessible
|
||||
aliases: [] # Alias redirections to the first element of the canonical domains
|
||||
rbac:
|
||||
roles: {}
|
||||
|
||||
{% endraw %}
|
2
templates/roles/web-app/vars/main.yml.j2
Normal file
2
templates/roles/web-app/vars/main.yml.j2
Normal file
@@ -0,0 +1,2 @@
|
||||
application_id: {{ application_id }} # ID of the application
|
||||
database_type: 0 # Database type [postgres, mariadb]
|
Reference in New Issue
Block a user