mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-11-05 20:58:21 +00:00
Compare commits
35 Commits
783b1e152d
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 0c16f9c43c | |||
| 7330aeb8ec | |||
| d3aad632c0 | |||
| d1bad3d7a6 | |||
| 43056a8b92 | |||
| 0bf286f62a | |||
| df8390f386 | |||
| 48557b06e3 | |||
| 1cff5778d3 | |||
| 60e2c972d6 | |||
| 637de6a190 | |||
| f5efbce205 | |||
| d6f3618d70 | |||
| 773655efb5 | |||
| 7bc9f7abd9 | |||
| ec7b8662dd | |||
| d1ccfd9cdd | |||
| d61c81634c | |||
| 265f815b48 | |||
| f8e5110730 | |||
| 37b213f96a | |||
| 5ef525eac9 | |||
| 295ae7e477 | |||
| c67ccc1df6 | |||
| cb483f60d1 | |||
| 2be73502ca | |||
| 57d5269b07 | |||
| 1eefdea050 | |||
| 561160504e | |||
| 9a4bf91276 | |||
| 468b6e734c | |||
| 83cb94b6ff | |||
| 6857295969 | |||
| 8ab398f679 | |||
| 31133ddd90 |
@@ -10,9 +10,23 @@ from module_utils.config_utils import get_app_conf
|
||||
from module_utils.get_url import get_url
|
||||
|
||||
|
||||
def _dedup_preserve(seq):
|
||||
"""Return a list with stable order and unique items."""
|
||||
seen = set()
|
||||
out = []
|
||||
for x in seq:
|
||||
if x not in seen:
|
||||
seen.add(x)
|
||||
out.append(x)
|
||||
return out
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
"""
|
||||
Custom filters for Content Security Policy generation and CSP-related utilities.
|
||||
Jinja filters for building a robust, CSP3-aware Content-Security-Policy header.
|
||||
Safari/CSP2 compatibility is ensured by merging the -elem/-attr variants into the base
|
||||
directives (style-src, script-src). We intentionally do NOT mirror back into -elem/-attr
|
||||
to allow true CSP3 granularity on modern browsers.
|
||||
"""
|
||||
|
||||
def filters(self):
|
||||
@@ -61,11 +75,14 @@ class FilterModule(object):
|
||||
"""
|
||||
Returns CSP flag tokens (e.g., "'unsafe-eval'", "'unsafe-inline'") for a directive,
|
||||
merging sane defaults with app config.
|
||||
Default: 'unsafe-inline' is enabled for style-src and style-src-elem.
|
||||
|
||||
Defaults:
|
||||
- For styles we enable 'unsafe-inline' by default (style-src, style-src-elem, style-src-attr),
|
||||
because many apps rely on inline styles / style attributes.
|
||||
- For scripts we do NOT enable 'unsafe-inline' by default.
|
||||
"""
|
||||
# Defaults that apply to all apps
|
||||
default_flags = {}
|
||||
if directive in ('style-src', 'style-src-elem'):
|
||||
if directive in ('style-src', 'style-src-elem', 'style-src-attr'):
|
||||
default_flags = {'unsafe-inline': True}
|
||||
|
||||
configured = get_app_conf(
|
||||
@@ -76,7 +93,6 @@ class FilterModule(object):
|
||||
{}
|
||||
)
|
||||
|
||||
# Merge defaults with configured flags (configured overrides defaults)
|
||||
merged = {**default_flags, **configured}
|
||||
|
||||
tokens = []
|
||||
@@ -131,82 +147,148 @@ class FilterModule(object):
|
||||
):
|
||||
"""
|
||||
Builds the Content-Security-Policy header value dynamically based on application settings.
|
||||
- Flags (e.g., 'unsafe-eval', 'unsafe-inline') are read from server.csp.flags.<directive>,
|
||||
with sane defaults applied in get_csp_flags (always 'unsafe-inline' for style-src and style-src-elem).
|
||||
- Inline hashes are read from server.csp.hashes.<directive>.
|
||||
- Whitelists are read from server.csp.whitelist.<directive>.
|
||||
- Inline hashes are added only if the final tokens do NOT include 'unsafe-inline'.
|
||||
|
||||
Key points:
|
||||
- CSP3-aware: supports base/elem/attr for styles and scripts.
|
||||
- Safari/CSP2 fallback: base directives (style-src, script-src) always include
|
||||
the union of their -elem/-attr variants.
|
||||
- We do NOT mirror back into -elem/-attr; finer CSP3 rules remain effective
|
||||
on modern browsers if you choose to use them.
|
||||
- If the app explicitly disables a token on the *base* (e.g. style-src.unsafe-inline: false),
|
||||
that token is removed from the merged base even if present in elem/attr.
|
||||
- Inline hashes are added ONLY if that directive does NOT include 'unsafe-inline'.
|
||||
- Whitelists/flags/hashes read from:
|
||||
server.csp.whitelist.<directive>
|
||||
server.csp.flags.<directive>
|
||||
server.csp.hashes.<directive>
|
||||
- “Smart defaults”:
|
||||
* internal CDN for style/script elem and connect
|
||||
* Matomo endpoints (if feature enabled) for script-elem/connect
|
||||
* Simpleicons (if feature enabled) for connect
|
||||
* reCAPTCHA (if feature enabled) for script-elem/frame-src
|
||||
* frame-ancestors extended for desktop/logout/keycloak if enabled
|
||||
"""
|
||||
try:
|
||||
directives = [
|
||||
'default-src', # Fallback source list for content types not explicitly listed
|
||||
'connect-src', # Allowed URLs for XHR, WebSockets, EventSource, fetch()
|
||||
'frame-ancestors', # Who may embed this page
|
||||
'frame-src', # Sources for nested browsing contexts (e.g., <iframe>)
|
||||
'script-src', # Sources for script execution
|
||||
'script-src-elem', # Sources for <script> elements
|
||||
'style-src', # Sources for inline styles and <style>/<link> elements
|
||||
'style-src-elem', # Sources for <style> and <link rel="stylesheet">
|
||||
'font-src', # Sources for fonts
|
||||
'worker-src', # Sources for workers
|
||||
'manifest-src', # Sources for web app manifests
|
||||
'media-src', # Sources for audio and video
|
||||
'default-src',
|
||||
'connect-src',
|
||||
'frame-ancestors',
|
||||
'frame-src',
|
||||
'script-src',
|
||||
'script-src-elem',
|
||||
'script-src-attr',
|
||||
'style-src',
|
||||
'style-src-elem',
|
||||
'style-src-attr',
|
||||
'font-src',
|
||||
'worker-src',
|
||||
'manifest-src',
|
||||
'media-src',
|
||||
]
|
||||
|
||||
parts = []
|
||||
tokens_by_dir = {}
|
||||
explicit_flags_by_dir = {}
|
||||
|
||||
for directive in directives:
|
||||
# Collect explicit flags (to later respect explicit "False" on base during merge)
|
||||
explicit_flags = get_app_conf(
|
||||
applications,
|
||||
application_id,
|
||||
'server.csp.flags.' + directive,
|
||||
False,
|
||||
{}
|
||||
)
|
||||
explicit_flags_by_dir[directive] = explicit_flags
|
||||
|
||||
tokens = ["'self'"]
|
||||
|
||||
# Load flags (includes defaults from get_csp_flags)
|
||||
# 1) Flags (with sane defaults)
|
||||
flags = self.get_csp_flags(applications, application_id, directive)
|
||||
tokens += flags
|
||||
|
||||
# Allow fetching from internal CDN by default for selected directives
|
||||
if directive in ['script-src-elem', 'connect-src', 'style-src-elem']:
|
||||
# 2) Internal CDN defaults for selected directives
|
||||
if directive in ('script-src-elem', 'connect-src', 'style-src-elem', 'style-src'):
|
||||
tokens.append(get_url(domains, 'web-svc-cdn', web_protocol))
|
||||
|
||||
# Matomo integration if feature is enabled
|
||||
if directive in ['script-src-elem', 'connect-src']:
|
||||
# 3) Matomo (if enabled)
|
||||
if directive in ('script-src-elem', 'connect-src'):
|
||||
if self.is_feature_enabled(applications, matomo_feature_name, application_id):
|
||||
tokens.append(get_url(domains, 'web-app-matomo', web_protocol))
|
||||
|
||||
# Simpleicons integration if feature is enabled
|
||||
if directive in ['connect-src']:
|
||||
# 4) Simpleicons (if enabled) – typically used via connect-src (fetch)
|
||||
if directive == 'connect-src':
|
||||
if self.is_feature_enabled(applications, 'simpleicons', application_id):
|
||||
tokens.append(get_url(domains, 'web-svc-simpleicons', web_protocol))
|
||||
|
||||
# ReCaptcha integration (scripts + frames) if feature is enabled
|
||||
# 5) reCAPTCHA (if enabled) – scripts + frames
|
||||
if self.is_feature_enabled(applications, 'recaptcha', application_id):
|
||||
if directive in ['script-src-elem', 'frame-src']:
|
||||
if directive in ('script-src-elem', 'frame-src'):
|
||||
tokens.append('https://www.gstatic.com')
|
||||
tokens.append('https://www.google.com')
|
||||
|
||||
# Frame ancestors handling (desktop + logout support)
|
||||
# 6) Frame ancestors (desktop + logout)
|
||||
if directive == 'frame-ancestors':
|
||||
if self.is_feature_enabled(applications, 'desktop', application_id):
|
||||
# Allow being embedded by the desktop app domain (and potentially its parent)
|
||||
# Allow being embedded by the desktop app domain's site
|
||||
domain = domains.get('web-app-desktop')[0]
|
||||
sld_tld = ".".join(domain.split(".")[-2:]) # e.g., example.com
|
||||
tokens.append(f"{sld_tld}")
|
||||
if self.is_feature_enabled(applications, 'logout', application_id):
|
||||
# Allow embedding via logout proxy and Keycloak app
|
||||
tokens.append(get_url(domains, 'web-svc-logout', web_protocol))
|
||||
tokens.append(get_url(domains, 'web-app-keycloak', web_protocol))
|
||||
|
||||
# Custom whitelist entries
|
||||
# 7) Custom whitelist
|
||||
tokens += self.get_csp_whitelist(applications, application_id, directive)
|
||||
|
||||
# Add inline content hashes ONLY if final tokens do NOT include 'unsafe-inline'
|
||||
# (Check tokens, not flags, to include defaults and later modifications.)
|
||||
# 8) Inline hashes (only if this directive does NOT include 'unsafe-inline')
|
||||
if "'unsafe-inline'" not in tokens:
|
||||
for snippet in self.get_csp_inline_content(applications, application_id, directive):
|
||||
tokens.append(self.get_csp_hash(snippet))
|
||||
|
||||
# Append directive
|
||||
parts.append(f"{directive} {' '.join(tokens)};")
|
||||
tokens_by_dir[directive] = _dedup_preserve(tokens)
|
||||
|
||||
# Static img-src directive (kept permissive for data/blob and any host)
|
||||
# ----------------------------------------------------------
|
||||
# CSP3 families → ensure CSP2 fallback (Safari-safe)
|
||||
# Merge style/script families so base contains union of elem/attr.
|
||||
# Respect explicit disables on the base (e.g. unsafe-inline=False).
|
||||
# Do NOT mirror back into elem/attr (keep granularity).
|
||||
# ----------------------------------------------------------
|
||||
def _strip_if_disabled(unioned_tokens, explicit_flags, name):
|
||||
"""
|
||||
Remove a token (e.g. 'unsafe-inline') from the unioned token list
|
||||
if it is explicitly disabled in the base directive flags.
|
||||
"""
|
||||
if isinstance(explicit_flags, dict) and explicit_flags.get(name) is False:
|
||||
tok = f"'{name}'"
|
||||
return [t for t in unioned_tokens if t != tok]
|
||||
return unioned_tokens
|
||||
|
||||
def merge_family(base_key, elem_key, attr_key):
|
||||
base = tokens_by_dir.get(base_key, [])
|
||||
elem = tokens_by_dir.get(elem_key, [])
|
||||
attr = tokens_by_dir.get(attr_key, [])
|
||||
union = _dedup_preserve(base + elem + attr)
|
||||
|
||||
# Respect explicit disables on the base
|
||||
explicit_base = explicit_flags_by_dir.get(base_key, {})
|
||||
# The most relevant flags for script/style:
|
||||
for flag_name in ('unsafe-inline', 'unsafe-eval'):
|
||||
union = _strip_if_disabled(union, explicit_base, flag_name)
|
||||
|
||||
tokens_by_dir[base_key] = union # write back only to base
|
||||
|
||||
merge_family('style-src', 'style-src-elem', 'style-src-attr')
|
||||
merge_family('script-src', 'script-src-elem', 'script-src-attr')
|
||||
|
||||
# ----------------------------------------------------------
|
||||
# Assemble header
|
||||
# ----------------------------------------------------------
|
||||
parts = []
|
||||
for directive in directives:
|
||||
if directive in tokens_by_dir:
|
||||
parts.append(f"{directive} {' '.join(tokens_by_dir[directive])};")
|
||||
|
||||
# Keep permissive img-src for data/blob + any host (as before)
|
||||
parts.append("img-src * data: blob:;")
|
||||
|
||||
return ' '.join(parts)
|
||||
|
||||
@@ -112,6 +112,10 @@ defaults_networks:
|
||||
subnet: 192.168.104.32/28
|
||||
web-svc-coturn:
|
||||
subnet: 192.168.104.48/28
|
||||
web-app-mini-qr:
|
||||
subnet: 192.168.104.64/28
|
||||
web-app-shopware:
|
||||
subnet: 192.168.104.80/28
|
||||
|
||||
# /24 Networks / 254 Usable Clients
|
||||
web-app-bigbluebutton:
|
||||
|
||||
@@ -80,6 +80,8 @@ ports:
|
||||
web-app-flowise: 8056
|
||||
web-app-minio_api: 8057
|
||||
web-app-minio_console: 8058
|
||||
web-app-mini-qr: 8059
|
||||
web-app-shopware: 8060
|
||||
web-app-bigbluebutton: 48087 # This port is predefined by bbb. @todo Try to change this to a 8XXX port
|
||||
public:
|
||||
# The following ports should be changed to 22 on the subdomain via stream mapping
|
||||
|
||||
31
roles/docker-container/templates/healthcheck/http.yml.j2
Normal file
31
roles/docker-container/templates/healthcheck/http.yml.j2
Normal file
@@ -0,0 +1,31 @@
|
||||
{# ------------------------------------------------------------------------------
|
||||
Healthcheck: HTTP Local
|
||||
------------------------------------------------------------------------------
|
||||
This template defines a generic HTTP healthcheck for containers exposing
|
||||
a web service on a local port (e.g., Nginx, Apache, PHP-FPM, Shopware, etc.).
|
||||
|
||||
It uses `wget` or `curl` (as fallback) to test if the container responds on
|
||||
http://127.0.0.1:{{ container_port }}/. If the request succeeds, Docker marks
|
||||
the container as "healthy"; otherwise, as "unhealthy".
|
||||
|
||||
Parameters:
|
||||
- container_port: The internal port the service listens on.
|
||||
|
||||
Timing:
|
||||
- interval: 30s → Check every 30 seconds
|
||||
- timeout: 5s → Each check must complete within 5 seconds
|
||||
- retries: 5 → Mark unhealthy after 5 consecutive failures
|
||||
- start_period: 20s → Grace period before health checks begin
|
||||
|
||||
Usage:
|
||||
{% filter indent(4) %}
|
||||
{% include 'roles/docker-container/templates/healthcheck/http.yml.j2' %}
|
||||
{% endfilter %}
|
||||
------------------------------------------------------------------------------
|
||||
#}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:{{ container_port }}/ >/dev/null || curl -fsS http://127.0.0.1:{{ container_port }}/ >/dev/null"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
@@ -6,7 +6,7 @@ entity_name: "{{ application_id | get_entity_name }
|
||||
docker_compose_flush_handlers: true
|
||||
|
||||
# Docker Compose
|
||||
database_type: "{{ application_id | get_entity_name }}"
|
||||
database_type: "{{ entity_name }}"
|
||||
|
||||
## Postgres
|
||||
POSTGRES_VOLUME: "{{ applications | get_app_conf(application_id, 'docker.volumes.data') }}"
|
||||
|
||||
@@ -16,5 +16,12 @@
|
||||
retries: 30
|
||||
networks:
|
||||
- default
|
||||
{{ lookup('template', 'roles/docker-container/templates/resource.yml.j2',vars={'service_name':'redis'}) | indent(4) }}
|
||||
{% macro include_resource_for(svc, indent=4) -%}
|
||||
{% set service_name = svc -%}
|
||||
{%- set _snippet -%}
|
||||
{% include 'roles/docker-container/templates/resource.yml.j2' %}
|
||||
{%- endset -%}
|
||||
{{ _snippet | indent(indent, true) }}
|
||||
{%- endmacro %}
|
||||
{{ include_resource_for('redis') }}
|
||||
{{ "\n" }}
|
||||
@@ -10,17 +10,6 @@
|
||||
|
||||
lua_need_request_body on;
|
||||
|
||||
header_filter_by_lua_block {
|
||||
local ct = ngx.header.content_type or ""
|
||||
if ct:lower():find("^text/html") then
|
||||
ngx.ctx.is_html = true
|
||||
-- IMPORTANT: body will be modified → drop Content-Length to avoid mismatches
|
||||
ngx.header.content_length = nil
|
||||
else
|
||||
ngx.ctx.is_html = false
|
||||
end
|
||||
}
|
||||
|
||||
body_filter_by_lua_block {
|
||||
-- Only process HTML responses
|
||||
if not ngx.ctx.is_html then
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
ssl_certificate {{ [ LETSENCRYPT_LIVE_PATH, ssl_cert_folder, 'fullchain.pem'] | path_join }};
|
||||
ssl_certificate_key {{ [ LETSENCRYPT_LIVE_PATH, ssl_cert_folder, 'privkey.pem' ] | path_join }};
|
||||
ssl_trusted_certificate {{ [ LETSENCRYPT_LIVE_PATH, ssl_cert_folder, 'chain.pem' ] | path_join }};
|
||||
ssl_certificate {{ [ LETSENCRYPT_LIVE_PATH | mandatory, ssl_cert_folder | mandatory, 'fullchain.pem'] | path_join }};
|
||||
ssl_certificate_key {{ [ LETSENCRYPT_LIVE_PATH | mandatory, ssl_cert_folder | mandatory, 'privkey.pem' ] | path_join }};
|
||||
ssl_trusted_certificate {{ [ LETSENCRYPT_LIVE_PATH | mandatory, ssl_cert_folder | mandatory, 'chain.pem' ] | path_join }};
|
||||
@@ -1,2 +1,33 @@
|
||||
add_header Content-Security-Policy "{{ applications | build_csp_header(application_id, domains) }}" always;
|
||||
proxy_hide_header Content-Security-Policy; # Todo: Make this optional
|
||||
# ===== Content Security Policy: only for documents and workers (no locations needed) =====
|
||||
|
||||
# 1) Define your CSP once (Jinja: escape double quotes to be safe)
|
||||
set $csp "{{ applications | build_csp_header(application_id, domains) | replace('\"','\\\"') }}";
|
||||
|
||||
# 2) Send CSP ONLY for document responses; also for workers via Sec-Fetch-Dest
|
||||
header_filter_by_lua_block {
|
||||
local ct = ngx.header.content_type or ngx.header["Content-Type"] or ""
|
||||
local dest = ngx.var.http_sec_fetch_dest or ""
|
||||
|
||||
local lct = ct:lower()
|
||||
local is_html = lct:find("^text/html") or lct:find("^application/xhtml+xml")
|
||||
local is_worker = (dest == "worker") or (dest == "serviceworker")
|
||||
|
||||
if is_html or is_worker then
|
||||
ngx.header["Content-Security-Policy"] = ngx.var.csp
|
||||
else
|
||||
ngx.header["Content-Security-Policy"] = nil
|
||||
ngx.header["Content-Security-Policy-Report-Only"] = nil
|
||||
end
|
||||
|
||||
-- If you'll modify the body later, drop Content-Length on HTML
|
||||
if is_html then
|
||||
ngx.ctx.is_html = true
|
||||
ngx.header.content_length = nil
|
||||
else
|
||||
ngx.ctx.is_html = false
|
||||
end
|
||||
}
|
||||
|
||||
# 3) Prevent upstream/app CSP (duplicates)
|
||||
proxy_hide_header Content-Security-Policy;
|
||||
proxy_hide_header Content-Security-Policy-Report-Only;
|
||||
|
||||
@@ -18,10 +18,10 @@ server:
|
||||
flags:
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-inline: true
|
||||
unsafe-eval: true
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
whitelist:
|
||||
font-src:
|
||||
|
||||
@@ -37,5 +37,5 @@ server:
|
||||
flags:
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
@@ -13,7 +13,7 @@ server:
|
||||
flags:
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
domains:
|
||||
canonical:
|
||||
|
||||
@@ -27,7 +27,7 @@ server:
|
||||
flags:
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-inline: true
|
||||
domains:
|
||||
canonical:
|
||||
|
||||
@@ -29,7 +29,7 @@ server:
|
||||
flags:
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-inline: true
|
||||
domains:
|
||||
canonical:
|
||||
|
||||
@@ -15,6 +15,8 @@ server:
|
||||
- https://code.jquery.com/
|
||||
style-src-elem:
|
||||
- https://cdn.jsdelivr.net
|
||||
- https://kit.fontawesome.com
|
||||
- https://code.jquery.com/
|
||||
font-src:
|
||||
- https://ka-f.fontawesome.com
|
||||
- https://cdn.jsdelivr.net
|
||||
@@ -25,7 +27,7 @@ server:
|
||||
frame-src:
|
||||
- "{{ WEB_PROTOCOL }}://*.{{ PRIMARY_DOMAIN }}"
|
||||
flags:
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-inline: true
|
||||
domains:
|
||||
canonical:
|
||||
|
||||
@@ -4,11 +4,13 @@ __metaclass__ = type
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.errors import AnsibleError
|
||||
|
||||
|
||||
class LookupModule(LookupBase):
|
||||
def run(self, terms, variables=None, **kwargs):
|
||||
"""
|
||||
Group the given cards into categorized and uncategorized lists
|
||||
based on the tags from menu_categories.
|
||||
Categories are sorted alphabetically before returning.
|
||||
"""
|
||||
if len(terms) < 2:
|
||||
raise AnsibleError("Missing required arguments")
|
||||
@@ -19,6 +21,7 @@ class LookupModule(LookupBase):
|
||||
categorized = {}
|
||||
uncategorized = []
|
||||
|
||||
# Categorize cards
|
||||
for card in cards:
|
||||
found = False
|
||||
for category, data in menu_categories.items():
|
||||
@@ -29,10 +32,14 @@ class LookupModule(LookupBase):
|
||||
if not found:
|
||||
uncategorized.append(card)
|
||||
|
||||
# Sort categories alphabetically
|
||||
sorted_categorized = {
|
||||
k: categorized[k] for k in sorted(categorized.keys(), key=str.lower)
|
||||
}
|
||||
|
||||
return [
|
||||
{
|
||||
'categorized': categorized,
|
||||
'categorized': sorted_categorized,
|
||||
'uncategorized': uncategorized,
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ contact:
|
||||
description: Send {{ 'us' if service_provider.type == 'legal' else 'me' }} an email
|
||||
icon:
|
||||
class: fa-solid fa-envelope
|
||||
url: mailto:{{service_provider.contact.email}}
|
||||
identifier: {{service_provider.contact.email}}
|
||||
url: mailto:{{ service_provider.contact.email }}
|
||||
identifier: {{ service_provider.contact.email }}
|
||||
|
||||
{% endif %}
|
||||
{% if service_provider.contact.phone is defined %}
|
||||
@@ -32,6 +32,6 @@ contact:
|
||||
description: Chat with {{ 'us' if service_provider.type == 'legal' else 'me' }} on Matrix
|
||||
icon:
|
||||
class: fa-solid fa-cubes
|
||||
identifier: "{{service_provider.contact.matrix}}"
|
||||
identifier: "{{ service_provider.contact.matrix }}"
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -25,7 +25,6 @@ portfolio_menu_categories:
|
||||
- ollama
|
||||
- openwebui
|
||||
- flowise
|
||||
- minio
|
||||
- qdrant
|
||||
- litellm
|
||||
|
||||
@@ -102,14 +101,12 @@ portfolio_menu_categories:
|
||||
- fusiondirectory
|
||||
- user-management
|
||||
|
||||
Customer Relationship Management:
|
||||
description: "Tools for managing customer relationships, sales pipelines, marketing, and support activities."
|
||||
Customer Relationship:
|
||||
description: "Customer Relationship Management (CRM) software for managing customer relationships, sales pipelines, marketing, and support activities."
|
||||
icon: "fa-solid fa-address-book"
|
||||
tags:
|
||||
- crm
|
||||
- customer
|
||||
- relationship
|
||||
- sales
|
||||
- marketing
|
||||
- support
|
||||
- espocrm
|
||||
@@ -222,7 +219,7 @@ portfolio_menu_categories:
|
||||
- snipe-it
|
||||
|
||||
Content Management:
|
||||
description: "CMS and web publishing platforms"
|
||||
description: "Content Management Systems (CMS) and web publishing platforms"
|
||||
icon: "fa-solid fa-file-alt"
|
||||
tags:
|
||||
- cms
|
||||
@@ -231,4 +228,27 @@ portfolio_menu_categories:
|
||||
- website
|
||||
- joomla
|
||||
- wordpress
|
||||
- blog
|
||||
- blog
|
||||
|
||||
Commerce:
|
||||
description: "Platforms for building and managing online shops, product catalogs, and digital sales channels — including payment, inventory, and customer features."
|
||||
icon: "fa-solid fa-cart-shopping"
|
||||
tags:
|
||||
- commerce
|
||||
- ecommerce
|
||||
- shopware
|
||||
- shop
|
||||
- sales
|
||||
- store
|
||||
- magento
|
||||
- pretix
|
||||
|
||||
Storage:
|
||||
description: "High-performance, self-hosted storage solutions for managing, scaling, and accessing unstructured data — including object storage compatible with Amazon S3 APIs."
|
||||
icon: "fa-solid fa-database"
|
||||
tags:
|
||||
- storage
|
||||
- object-storage
|
||||
- s3
|
||||
- minio
|
||||
- datasets
|
||||
|
||||
@@ -10,7 +10,7 @@ features:
|
||||
server:
|
||||
csp:
|
||||
flags:
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
|
||||
@@ -12,9 +12,7 @@ server:
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
unsafe-eval: true
|
||||
style-src:
|
||||
unsafe-inline: true
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-eval: true
|
||||
whitelist:
|
||||
connect-src:
|
||||
|
||||
@@ -18,10 +18,10 @@ server:
|
||||
flags:
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-inline: true
|
||||
unsafe-eval: true
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
oauth2_proxy:
|
||||
application: "application"
|
||||
|
||||
@@ -7,10 +7,10 @@ docker_compose_flush_handlers: false
|
||||
|
||||
# Friendica
|
||||
friendica_container: "friendica"
|
||||
friendica_no_validation: "{{ applications | get_app_conf(application_id, 'features.oidc', True) }}" # Email validation is not neccessary if OIDC is active
|
||||
friendica_no_validation: "{{ applications | get_app_conf(application_id, 'features.oidc') }}" # Email validation is not neccessary if OIDC is active
|
||||
friendica_application_base: "/var/www/html"
|
||||
friendica_docker_ldap_config: "{{ friendica_application_base }}/config/ldapauth.config.php"
|
||||
friendica_host_ldap_config: "{{ docker_compose.directories.volumes }}ldapauth.config.php"
|
||||
friendica_config_dir: "{{ friendica_application_base }}/config"
|
||||
friendica_config_file: "{{ friendica_config_dir }}/local.config.php"
|
||||
friendica_docker_ldap_config: "{{ [ friendica_application_base, 'config/ldapauth.config.php' ] | path_join }}"
|
||||
friendica_host_ldap_config: "{{ [ docker_compose.directories.volumes, 'ldapauth.config.php' ] | path_join }}"
|
||||
friendica_config_dir: "{{ [ friendica_application_base, 'config' ] | path_join }}"
|
||||
friendica_config_file: "{{ [ friendica_config_dir, 'local.config.php' ] | path_join }}"
|
||||
friendica_user: "www-data"
|
||||
|
||||
@@ -27,7 +27,7 @@ server:
|
||||
aliases: []
|
||||
csp:
|
||||
flags:
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
whitelist:
|
||||
font-src:
|
||||
|
||||
@@ -24,7 +24,7 @@ server:
|
||||
flags:
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
whitelist:
|
||||
font-src:
|
||||
|
||||
@@ -27,3 +27,7 @@ server:
|
||||
domains:
|
||||
canonical:
|
||||
- lab.git.{{ PRIMARY_DOMAIN }}
|
||||
csp:
|
||||
flags:
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
|
||||
@@ -29,7 +29,7 @@ server:
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
unsafe-eval: true
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-inline: true
|
||||
unsafe-eval: true
|
||||
domains:
|
||||
|
||||
@@ -14,7 +14,7 @@ server:
|
||||
aliases: []
|
||||
csp:
|
||||
flags:
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
# (Optional) specifically wait for the CLI installer script
|
||||
- name: "Check for CLI installer"
|
||||
command:
|
||||
argv: [ docker, exec, "{{ JOOMLA_CONTAINER }}", test, -f, /var/www/html/installation/joomla.php ]
|
||||
argv: [ docker, exec, "{{ JOOMLA_CONTAINER }}", test, -f, "{{ JOOMLA_INSTALLER_CLI_FILE }}" ]
|
||||
register: has_installer
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
@@ -30,9 +30,11 @@
|
||||
argv:
|
||||
- docker
|
||||
- exec
|
||||
- --user
|
||||
- "{{ JOOMLA_WEB_USER }}"
|
||||
- "{{ JOOMLA_CONTAINER }}"
|
||||
- php
|
||||
- /var/www/html/installation/joomla.php
|
||||
- "{{ JOOMLA_INSTALLER_CLI_FILE }}"
|
||||
- install
|
||||
- "--db-type={{ JOOMLA_DB_CONNECTOR }}"
|
||||
- "--db-host={{ database_host }}"
|
||||
|
||||
18
roles/web-app-joomla/tasks/05_reset_admin_password.yml
Normal file
18
roles/web-app-joomla/tasks/05_reset_admin_password.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
# Reset Joomla admin password via CLI (inside the container)
|
||||
- name: "Reset Joomla admin password (non-interactive CLI)"
|
||||
command:
|
||||
argv:
|
||||
- docker
|
||||
- exec
|
||||
- "{{ JOOMLA_CONTAINER }}"
|
||||
- php
|
||||
- "{{ JOOMLA_CLI_FILE }}"
|
||||
- user:reset-password
|
||||
- "--username"
|
||||
- "{{ JOOMLA_USER_NAME }}"
|
||||
- "--password"
|
||||
- "{{ JOOMLA_USER_PASSWORD }}"
|
||||
register: j_password_reset
|
||||
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
||||
changed_when: j_password_reset.rc == 0
|
||||
@@ -24,3 +24,7 @@
|
||||
- name: Include assert routines
|
||||
include_tasks: "04_assert.yml"
|
||||
when: MODE_ASSERT | bool
|
||||
|
||||
- name: Reset Admin Password
|
||||
include_tasks: 05_reset_admin_password.yml
|
||||
|
||||
|
||||
@@ -13,9 +13,12 @@ JOOMLA_DOMAINS: "{{ applications | get_app_conf(application_id
|
||||
JOOMLA_SITE_NAME: "{{ SOFTWARE_NAME }} Joomla - CMS"
|
||||
JOOMLA_DB_CONNECTOR: "{{ 'pgsql' if database_type == 'postgres' else 'mysqli' }}"
|
||||
JOOMLA_CONFIG_FILE: "/var/www/html/configuration.php"
|
||||
JOOMLA_INSTALLER_CLI_FILE: "/var/www/html/installation/joomla.php"
|
||||
JOOMLA_CLI_FILE: "/var/www/html/cli/joomla.php"
|
||||
|
||||
# User
|
||||
JOOMLA_USER_NAME: "{{ users.administrator.username }}"
|
||||
JOOMLA_USER: "{{ JOOMLA_USER_NAME | capitalize }}"
|
||||
JOOMLA_USER_PASSWORD: "{{ users.administrator.password }}"
|
||||
JOOMLA_USER_EMAIL: "{{ users.administrator.email }}"
|
||||
JOOMLA_WEB_USER: "www-data"
|
||||
@@ -19,9 +19,9 @@ server:
|
||||
flags:
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-inline: true
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
whitelist:
|
||||
frame-src:
|
||||
|
||||
@@ -18,12 +18,12 @@ features:
|
||||
server:
|
||||
csp:
|
||||
flags:
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
unsafe-eval: true
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-inline: true
|
||||
domains:
|
||||
aliases: []
|
||||
|
||||
@@ -13,6 +13,16 @@ server:
|
||||
aliases: []
|
||||
status_codes:
|
||||
default: 404
|
||||
csp:
|
||||
flags:
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
whitelist:
|
||||
script-src-elem:
|
||||
- "https://www.hcaptcha.com"
|
||||
- "https://js.hcaptcha.com"
|
||||
frame-src:
|
||||
- "https://newassets.hcaptcha.com/"
|
||||
docker:
|
||||
services:
|
||||
database:
|
||||
|
||||
@@ -16,11 +16,11 @@ server:
|
||||
aliases: []
|
||||
csp:
|
||||
flags:
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-inline: true
|
||||
unsafe-eval: true
|
||||
rbac:
|
||||
|
||||
@@ -17,12 +17,12 @@ server:
|
||||
style-src-elem:
|
||||
- https://fonts.googleapis.com
|
||||
flags:
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-eval: true
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
unsafe-eval: true
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
unsafe-eval: true
|
||||
domains:
|
||||
|
||||
@@ -27,12 +27,12 @@ features:
|
||||
server:
|
||||
csp:
|
||||
flags:
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-eval: true
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
unsafe-eval: true
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
whitelist:
|
||||
connect-src:
|
||||
|
||||
@@ -4,6 +4,11 @@ server:
|
||||
canonical:
|
||||
- "m.wiki.{{ PRIMARY_DOMAIN }}"
|
||||
aliases: []
|
||||
csp:
|
||||
flags:
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
|
||||
docker:
|
||||
services:
|
||||
database:
|
||||
|
||||
@@ -11,7 +11,7 @@ MEDIAWIKI_URL: "{{ domains | get_url(application_id, WEB_PROT
|
||||
MEDIAWIKI_HTML_DIR: "/var/www/html"
|
||||
MEDIAWIKI_CONFIG_DIR: "{{ docker_compose.directories.config }}"
|
||||
MEDIAWIKI_VOLUMES_DIR: "{{ docker_compose.directories.volumes }}"
|
||||
MEDIAWIKI_LOCAL_MOUNT_DIR: "{{ MEDIAWIKI_VOLUMES_DIR }}/mw-local"
|
||||
MEDIAWIKI_LOCAL_MOUNT_DIR: "{{ [ MEDIAWIKI_VOLUMES_DIR, 'mw-local' ] | path_join }}"
|
||||
MEDIAWIKI_LOCAL_PATH: "/opt/mw-local"
|
||||
|
||||
## Docker
|
||||
|
||||
@@ -29,7 +29,7 @@ server:
|
||||
frame-ancestors:
|
||||
- "*" # No damage if it's used somewhere on other websites, it anyhow looks like art
|
||||
flags:
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
domains:
|
||||
canonical:
|
||||
|
||||
@@ -23,3 +23,5 @@
|
||||
- name: Build data (single async task)
|
||||
include_tasks: 02_build_data.yml
|
||||
when: MIG_BUILD_DATA | bool
|
||||
|
||||
- include_tasks: utils/run_once.yml
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
---
|
||||
- block:
|
||||
- include_tasks: 01_core.yml
|
||||
- include_tasks: utils/run_once.yml
|
||||
name: "Setup Meta Infinite Graph"
|
||||
- include_tasks: 01_core.yml
|
||||
when: run_once_web_app_mig is not defined
|
||||
|
||||
26
roles/web-app-mini-qr/README.md
Normal file
26
roles/web-app-mini-qr/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Mini-QR
|
||||
|
||||
## Description
|
||||
|
||||
**Mini-QR** is a lightweight, self-hosted web application for generating QR codes instantly and privately.
|
||||
It provides a minimal and elegant interface to convert any text, URL, or message into a QR code — directly in your browser, without external tracking or dependencies.
|
||||
|
||||
## Overview
|
||||
|
||||
Mini-QR is designed for simplicity, privacy, and speed.
|
||||
It offers an ad-free interface that works entirely within your local environment, making it ideal for individuals, organizations, and educational institutions that value data sovereignty.
|
||||
The app runs as a single Docker container and requires no database or backend setup, enabling secure and frictionless QR generation anywhere.
|
||||
|
||||
## Features
|
||||
|
||||
- **Instant QR code creation** — simply type or paste your content.
|
||||
- **Privacy-friendly** — all generation happens client-side; no data leaves your server.
|
||||
- **Open Source** — fully auditable and modifiable for custom integrations.
|
||||
- **Responsive Design** — optimized for both desktop and mobile devices.
|
||||
- **Docker-ready** — can be deployed in seconds using the official image.
|
||||
|
||||
## Further Resources
|
||||
|
||||
- 🧩 Upstream project: [lyqht/mini-qr](https://github.com/lyqht/mini-qr)
|
||||
- 📦 Upstream Dockerfile: [View on GitHub](https://github.com/lyqht/mini-qr/blob/main/Dockerfile)
|
||||
- 🌐 Docker Image: `ghcr.io/lyqht/mini-qr:latest`
|
||||
2
roles/web-app-mini-qr/TODO.md
Normal file
2
roles/web-app-mini-qr/TODO.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# To-dos
|
||||
- Remove clarity.ms
|
||||
38
roles/web-app-mini-qr/config/main.yml
Normal file
38
roles/web-app-mini-qr/config/main.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
docker:
|
||||
services:
|
||||
redis:
|
||||
enabled: false
|
||||
database:
|
||||
enabled: false
|
||||
features:
|
||||
matomo: true
|
||||
css: true
|
||||
desktop: true
|
||||
logout: false
|
||||
server:
|
||||
csp:
|
||||
whitelist:
|
||||
script-src-elem:
|
||||
# Propably some tracking code
|
||||
# Anyhow implemented to pass CSP checks
|
||||
# @todo Remove
|
||||
- https://www.clarity.ms/
|
||||
- https://scripts.clarity.ms/
|
||||
connect-src:
|
||||
- https://q.clarity.ms
|
||||
- https://n.clarity.ms
|
||||
- "data:"
|
||||
style-src-elem: []
|
||||
font-src: []
|
||||
frame-ancestors: []
|
||||
flags:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
script-src-attr:
|
||||
unsafe-eval: true
|
||||
domains:
|
||||
canonical:
|
||||
- "qr.{{ PRIMARY_DOMAIN }}"
|
||||
aliases: []
|
||||
27
roles/web-app-mini-qr/meta/main.yml
Normal file
27
roles/web-app-mini-qr/meta/main.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
galaxy_info:
|
||||
author: "Kevin Veen-Birkenbach"
|
||||
description: >
|
||||
Mini-QR is a minimalist, self-hosted web application that allows users to
|
||||
instantly generate QR codes in a privacy-friendly way.
|
||||
license: "Infinito.Nexus NonCommercial License"
|
||||
license_url: "https://s.infinito.nexus/license"
|
||||
company: |
|
||||
Kevin Veen-Birkenbach
|
||||
Consulting & Coaching Solutions
|
||||
https://www.veen.world
|
||||
galaxy_tags:
|
||||
- infinito
|
||||
- qr
|
||||
- webapp
|
||||
- privacy
|
||||
- utility
|
||||
- education
|
||||
- lightweight
|
||||
repository: "https://github.com/lyqht/mini-qr"
|
||||
issue_tracker_url: "https://github.com/lyqht/mini-qr/issues"
|
||||
documentation: "https://github.com/lyqht/mini-qr"
|
||||
logo:
|
||||
class: "fa-solid fa-qrcode"
|
||||
run_after: []
|
||||
|
||||
dependencies: []
|
||||
7
roles/web-app-mini-qr/tasks/01_core.yml
Normal file
7
roles/web-app-mini-qr/tasks/01_core.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
- name: "load docker, proxy for '{{ application_id }}'"
|
||||
include_role:
|
||||
name: sys-stk-full-stateless
|
||||
vars:
|
||||
docker_compose_flush_handlers: false
|
||||
|
||||
- include_tasks: utils/run_once.yml
|
||||
4
roles/web-app-mini-qr/tasks/main.yml
Normal file
4
roles/web-app-mini-qr/tasks/main.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
- include_tasks: 01_core.yml
|
||||
when: run_once_web_app_mini_qr is not defined
|
||||
|
||||
12
roles/web-app-mini-qr/templates/docker-compose.yml.j2
Normal file
12
roles/web-app-mini-qr/templates/docker-compose.yml.j2
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||
{% set container_port = 8080 %}
|
||||
{{ application_id | get_entity_name }}:
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
image: "{{ MINI_QR_IMAGE }}:{{ MINI_QR_VERSION }}"
|
||||
container_name: "{{ MINI_QR_CONTAINER }}"
|
||||
ports:
|
||||
- 127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
|
||||
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||
12
roles/web-app-mini-qr/vars/main.yml
Normal file
12
roles/web-app-mini-qr/vars/main.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
# General
|
||||
application_id: web-app-mini-qr
|
||||
entity_name: "{{ application_id | get_entity_name }}"
|
||||
|
||||
# Docker
|
||||
docker_compose_flush_handlers: false
|
||||
docker_pull_git_repository: false
|
||||
|
||||
# Helper variables
|
||||
MINI_QR_IMAGE: "ghcr.io/lyqht/mini-qr"
|
||||
MINI_QR_VERSION: "latest"
|
||||
MINI_QR_CONTAINER: "{{ entity_name }}"
|
||||
@@ -10,7 +10,7 @@ server:
|
||||
flags:
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-eval: true
|
||||
domains:
|
||||
canonical:
|
||||
|
||||
@@ -12,9 +12,9 @@ server:
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
unsafe-eval: true
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-eval: true
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
unsafe-eval: true
|
||||
whitelist:
|
||||
|
||||
@@ -19,9 +19,9 @@ server:
|
||||
# Makes sense that all of the website content is available in the navigator
|
||||
- "{{ WEB_PROTOCOL }}://*.{{ PRIMARY_DOMAIN }}"
|
||||
flags:
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-eval: true
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
|
||||
@@ -2,13 +2,16 @@ version: "production" # @see https://nextcloud.com/blog/nex
|
||||
server:
|
||||
csp:
|
||||
flags:
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-eval: true
|
||||
whitelist:
|
||||
script-src-elem:
|
||||
- "https://www.hcaptcha.com"
|
||||
- "https://js.hcaptcha.com"
|
||||
font-src:
|
||||
- "data:"
|
||||
connect-src:
|
||||
@@ -19,6 +22,7 @@ server:
|
||||
frame-src:
|
||||
- "{{ WEBSOCKET_PROTOCOL }}://collabora.{{ PRIMARY_DOMAIN }}"
|
||||
- "{{ WEB_PROTOCOL }}://collabora.{{ PRIMARY_DOMAIN }}"
|
||||
- "https://newassets.hcaptcha.com/"
|
||||
worker-src:
|
||||
- "blob:"
|
||||
domains:
|
||||
@@ -28,13 +32,15 @@ server:
|
||||
docker:
|
||||
volumes:
|
||||
data: nextcloud_data
|
||||
whiteboard_tmp: nextcloud_whiteboard_tmp
|
||||
whiteboard_fontcache: nextcloud_whiteboard_fontcache
|
||||
services:
|
||||
redis:
|
||||
enabled: true
|
||||
cpus: "0.25"
|
||||
mem_reservation: "64m"
|
||||
mem_limit: "256m"
|
||||
pids_limit: 256
|
||||
cpus: "1"
|
||||
mem_reservation: "1g"
|
||||
mem_limit: "8g"
|
||||
pids_limit: 512
|
||||
database:
|
||||
enabled: true
|
||||
cpus: "0.75"
|
||||
@@ -80,7 +86,7 @@ docker:
|
||||
cpus: "1.0"
|
||||
mem_reservation: "256m"
|
||||
mem_limit: "1g"
|
||||
pids_limit: 512
|
||||
pids_limit: 1024
|
||||
whiteboard:
|
||||
name: "nextcloud-whiteboard"
|
||||
image: "ghcr.io/nextcloud-releases/whiteboard"
|
||||
@@ -90,7 +96,7 @@ docker:
|
||||
cpus: "0.25"
|
||||
mem_reservation: "128m"
|
||||
mem_limit: "512m"
|
||||
pids_limit: 256
|
||||
pids_limit: 1024
|
||||
enabled: "{{ applications | get_app_conf('web-app-nextcloud', 'features.oidc', False, True, True) }}" # Activate OIDC for Nextcloud
|
||||
# floavor decides which OICD plugin should be used.
|
||||
# Available options: oidc_login, sociallogin
|
||||
|
||||
@@ -14,6 +14,21 @@
|
||||
vars:
|
||||
docker_compose_flush_handlers: false
|
||||
|
||||
- block:
|
||||
- name: "Create '{{ NEXTCLOUD_WHITEBOARD_SERVICE_DIRECTORY }}' Directory"
|
||||
file:
|
||||
path: "{{ NEXTCLOUD_WHITEBOARD_SERVICE_DIRECTORY }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
- name: "Deploy Whiteboard Dockerfile to '{{ NEXTCLOUD_WHITEBOARD_SERVICE_DOCKERFILE }}'"
|
||||
template:
|
||||
src: "Dockerfiles/Whiteboard.j2"
|
||||
dest: "{{ NEXTCLOUD_WHITEBOARD_SERVICE_DOCKERFILE }}"
|
||||
notify: docker compose build
|
||||
|
||||
when: NEXTCLOUD_WHITEBOARD_ENABLED | bool
|
||||
|
||||
- name: "create {{ NEXTCLOUD_HOST_CONF_ADD_PATH }}"
|
||||
file:
|
||||
path: "{{ NEXTCLOUD_HOST_CONF_ADD_PATH }}"
|
||||
@@ -24,8 +39,8 @@
|
||||
template:
|
||||
src: "{{ item }}"
|
||||
dest: "{{ NEXTCLOUD_HOST_CONF_ADD_PATH }}/{{ item | basename | regex_replace('\\.j2$', '') }}"
|
||||
owner: "{{ NEXTCLOUD_DOCKER_USER_id }}"
|
||||
group: "{{ NEXTCLOUD_DOCKER_USER_id }}"
|
||||
owner: "{{ NEXTCLOUD_DOCKER_USER_ID }}"
|
||||
group: "{{ NEXTCLOUD_DOCKER_USER_ID }}"
|
||||
loop: "{{ lookup('fileglob', role_path ~ '/templates/config/*.j2', wantlist=True) }}"
|
||||
notify: docker compose up
|
||||
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
command: "{{ NEXTCLOUD_DOCKER_EXEC_OCC }} maintenance:repair --include-expensive"
|
||||
register: occ_repair
|
||||
changed_when: "'No repairs needed' not in occ_repair.stdout"
|
||||
retries: 3
|
||||
delay: 10
|
||||
until: occ_repair.rc == 0
|
||||
|
||||
- name: Nextcloud | App update (retry once)
|
||||
command: "{{ NEXTCLOUD_DOCKER_EXEC_OCC }} app:update --all"
|
||||
|
||||
@@ -16,6 +16,13 @@
|
||||
- name: Flush all handlers immediately so that occ can be used
|
||||
meta: flush_handlers
|
||||
|
||||
- name: Wait until Redis is ready (PONG)
|
||||
command: "docker exec {{ NEXTCLOUD_REDIS_CONTAINER }} redis-cli ping"
|
||||
register: redis_ping
|
||||
retries: 60
|
||||
delay: 2
|
||||
until: (redis_ping.stdout | default('')) is search('PONG')
|
||||
|
||||
- name: Update\Upgrade Nextcloud
|
||||
include_tasks: 03_upgrade.yml
|
||||
when: MODE_UPDATE | bool
|
||||
|
||||
27
roles/web-app-nextcloud/templates/Dockerfiles/Whiteboard.j2
Normal file
27
roles/web-app-nextcloud/templates/Dockerfiles/Whiteboard.j2
Normal file
@@ -0,0 +1,27 @@
|
||||
FROM {{ NEXTCLOUD_WHITEBOARD_IMAGE }}:{{ NEXTCLOUD_WHITEBOARD_VERSION }}
|
||||
|
||||
# Temporarily switch to root so we can install packages
|
||||
USER 0
|
||||
|
||||
# Install Chromium, ffmpeg, fonts, and runtime libraries for headless operation on Alpine
|
||||
RUN apk add --no-cache \
|
||||
chromium \
|
||||
ffmpeg \
|
||||
nss \
|
||||
freetype \
|
||||
harfbuzz \
|
||||
ttf-dejavu \
|
||||
ttf-liberation \
|
||||
udev \
|
||||
ca-certificates \
|
||||
&& update-ca-certificates
|
||||
|
||||
# Ensure a consistent Chromium binary path
|
||||
RUN if [ -x /usr/bin/chromium-browser ]; then ln -sf /usr/bin/chromium-browser /usr/bin/chromium; fi
|
||||
|
||||
# Environment variables used by Puppeteer
|
||||
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium \
|
||||
PUPPETEER_SKIP_DOWNLOAD=true
|
||||
|
||||
# Switch back to the original non-root user (nobody)
|
||||
USER 65534
|
||||
@@ -67,16 +67,29 @@
|
||||
{{ service_name }}:
|
||||
{% set container_port = NEXTCLOUD_WHITEBOARD_PORT_INTERNAL %}
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: {{ NEXTCLOUD_WHITEBOARD_SERVICE_DOCKERFILE }}
|
||||
pull_policy: never
|
||||
{% include 'roles/docker-container/templates/healthcheck/nc.yml.j2' %}
|
||||
image: "{{ NEXTCLOUD_WHITEBOARD_IMAGE }}:{{ NEXTCLOUD_WHITEBOARD_VERSION }}"
|
||||
image: "{{ NEXTCLOUD_WHITEBOARD_CUSTOM_IMAGE }}"
|
||||
container_name: {{ NEXTCLOUD_WHITEBOARD_CONTAINER }}
|
||||
volumes:
|
||||
- whiteboard_tmp:/tmp
|
||||
- whiteboard_fontcache:/var/cache/fontconfig
|
||||
|
||||
expose:
|
||||
- "{{ container_port }}"
|
||||
shm_size: 1g
|
||||
networks:
|
||||
default:
|
||||
ipv4_address: 192.168.102.71
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% set service_name = NEXTCLOUD_CRON_SERVICE %}
|
||||
{{ service_name }}:
|
||||
container_name: "{{ NEXTCLOUD_CRON_CONTAINER }}"
|
||||
@@ -99,5 +112,11 @@
|
||||
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||
data:
|
||||
name: {{ NEXTCLOUD_VOLUME }}
|
||||
{% if NEXTCLOUD_WHITEBOARD_ENABLED %}
|
||||
whiteboard_tmp:
|
||||
name: {{ NEXTCLOUD_WHITEBOARD_TMP_VOLUME }}
|
||||
whiteboard_fontcache:
|
||||
name: {{ NEXTCLOUD_WHITEBOARD_FRONTCACHE_VOLUME }}
|
||||
{% endif %}
|
||||
|
||||
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||
|
||||
@@ -60,4 +60,9 @@ NEXTCLOUD_URL= "{{ NEXTCLOUD_URL }}"
|
||||
JWT_SECRET_KEY= "{{ NEXTCLOUD_WHITEBOARD_JWT }}"
|
||||
STORAGE_STRATEGY=redis
|
||||
REDIS_URL=redis://redis:6379/0
|
||||
# Chromium (headless) hardening for Whiteboard
|
||||
CHROMIUM_FLAGS=--headless=new --no-sandbox --disable-gpu --disable-dev-shm-usage --use-gl=swiftshader --disable-software-rasterizer
|
||||
# Falls das Image Chromium mitbringt – Pfad meistens /usr/bin/chromium oder /usr/bin/chromium-browser:
|
||||
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
|
||||
PUPPETEER_SKIP_DOWNLOAD=true
|
||||
{% endif %}
|
||||
@@ -23,6 +23,12 @@ server
|
||||
{% include 'roles/sys-svc-proxy/templates/location/ws.conf.j2' %}
|
||||
{% endif %}
|
||||
|
||||
{% if NEXTCLOUD_WHITEBOARD_ENABLED | bool %}
|
||||
{% set location_ws = '^~ ' ~ NEXTCLOUD_WHITEBOARD_LOCATION %}
|
||||
{% set ws_port = NEXTCLOUD_PORT %}
|
||||
{% include 'roles/sys-svc-proxy/templates/location/ws.conf.j2' %}
|
||||
{% endif %}
|
||||
|
||||
{% include 'roles/sys-svc-proxy/templates/location/html.conf.j2' %}
|
||||
|
||||
location ^~ /.well-known {
|
||||
|
||||
@@ -116,24 +116,32 @@ NEXTCLOUD_HPB_TURN_STANDALONE_CONFIG: >-
|
||||
}}
|
||||
|
||||
### Whiteboard
|
||||
NEXTCLOUD_WHITEBOARD_SERVICE: "whiteboard"
|
||||
NEXTCLOUD_WHITEBOARD_CONTAINER: "{{ applications | get_app_conf(application_id, 'docker.services.' ~ NEXTCLOUD_WHITEBOARD_SERVICE ~'.name') }}"
|
||||
NEXTCLOUD_WHITEBOARD_IMAGE: "{{ applications | get_app_conf(application_id, 'docker.services.' ~ NEXTCLOUD_WHITEBOARD_SERVICE ~'.image') }}"
|
||||
NEXTCLOUD_WHITEBOARD_VERSION: "{{ applications | get_app_conf(application_id, 'docker.services.' ~ NEXTCLOUD_WHITEBOARD_SERVICE ~'.version') }}"
|
||||
NEXTCLOUD_WHITEBOARD_ENABLED: "{{ applications | get_app_conf(application_id, 'plugins.' ~ NEXTCLOUD_WHITEBOARD_SERVICE ~'.enabled') }}"
|
||||
NEXTCLOUD_WHITEBOARD_PORT_INTERNAL: "3002"
|
||||
NEXTCLOUD_WHITEBOARD_JWT: "{{ applications | get_app_conf(application_id, 'credentials.' ~ NEXTCLOUD_WHITEBOARD_SERVICE ~'_jwt_secret') }}"
|
||||
NEXTCLOUD_WHITEBOARD_LOCATION: "/whiteboard/"
|
||||
NEXTCLOUD_WHITEBOARD_URL: "{{ [ NEXTCLOUD_URL, NEXTCLOUD_WHITEBOARD_LOCATION ] | url_join }}"
|
||||
NEXTCLOUD_WHITEBOARD_SERVICE: "whiteboard"
|
||||
NEXTCLOUD_WHITEBOARD_CONTAINER: "{{ applications | get_app_conf(application_id, 'docker.services.' ~ NEXTCLOUD_WHITEBOARD_SERVICE ~'.name') }}"
|
||||
NEXTCLOUD_WHITEBOARD_IMAGE: "{{ applications | get_app_conf(application_id, 'docker.services.' ~ NEXTCLOUD_WHITEBOARD_SERVICE ~'.image') }}"
|
||||
NEXTCLOUD_WHITEBOARD_VERSION: "{{ applications | get_app_conf(application_id, 'docker.services.' ~ NEXTCLOUD_WHITEBOARD_SERVICE ~'.version') }}"
|
||||
NEXTCLOUD_WHITEBOARD_CUSTOM_IMAGE: "nextcloud_whiteboard_custom"
|
||||
NEXTCLOUD_WHITEBOARD_ENABLED: "{{ applications | get_app_conf(application_id, 'plugins.' ~ NEXTCLOUD_WHITEBOARD_SERVICE ~'.enabled') }}"
|
||||
NEXTCLOUD_WHITEBOARD_PORT_INTERNAL: "3002"
|
||||
NEXTCLOUD_WHITEBOARD_JWT: "{{ applications | get_app_conf(application_id, 'credentials.' ~ NEXTCLOUD_WHITEBOARD_SERVICE ~'_jwt_secret') }}"
|
||||
NEXTCLOUD_WHITEBOARD_LOCATION: "/whiteboard/"
|
||||
NEXTCLOUD_WHITEBOARD_URL: "{{ [ NEXTCLOUD_URL, NEXTCLOUD_WHITEBOARD_LOCATION ] | url_join }}"
|
||||
NEXTCLOUD_WHITEBOARD_TMP_VOLUME: "{{ applications | get_app_conf(application_id, 'docker.volumes.whiteboard_tmp') }}"
|
||||
NEXTCLOUD_WHITEBOARD_FRONTCACHE_VOLUME: "{{ applications | get_app_conf(application_id, 'docker.volumes.whiteboard_fontcache') }}"
|
||||
NEXTCLOUD_WHITEBOARD_SERVICE_DIRECTORY: "{{ [ docker_compose.directories.services, 'whiteboard' ] | path_join }}"
|
||||
NEXTCLOUD_WHITEBOARD_SERVICE_DOCKERFILE: "{{ [ NEXTCLOUD_WHITEBOARD_SERVICE_DIRECTORY, 'Dockerfile' ] | path_join }}"
|
||||
|
||||
### Collabora
|
||||
NEXTCLOUD_COLLABORA_URL: "{{ domains | get_url('web-svc-collabora', WEB_PROTOCOL) }}"
|
||||
NEXTCLOUD_COLLABORA_URL: "{{ domains | get_url('web-svc-collabora', WEB_PROTOCOL) }}"
|
||||
|
||||
## User Configuration
|
||||
NEXTCLOUD_DOCKER_USER_id: 82 # UID of the www-data user
|
||||
NEXTCLOUD_DOCKER_USER: "www-data" # Name of the www-data user (Set here to easy change it in the future)
|
||||
NEXTCLOUD_DOCKER_USER_ID: 82 # UID of the www-data user
|
||||
NEXTCLOUD_DOCKER_USER: "www-data" # Name of the www-data user (Set here to easy change it in the future)
|
||||
|
||||
## Execution
|
||||
NEXTCLOUD_INTERNAL_OCC_COMMAND: "{{ [ NEXTCLOUD_DOCKER_WORK_DIRECTORY, 'occ'] | path_join }}"
|
||||
NEXTCLOUD_DOCKER_EXEC: "docker exec -u {{ NEXTCLOUD_DOCKER_USER }} {{ NEXTCLOUD_CONTAINER }}" # General execute composition
|
||||
NEXTCLOUD_DOCKER_EXEC_OCC: "{{ NEXTCLOUD_DOCKER_EXEC }} {{ NEXTCLOUD_INTERNAL_OCC_COMMAND }}" # Execute docker occ command
|
||||
NEXTCLOUD_INTERNAL_OCC_COMMAND: "{{ [ NEXTCLOUD_DOCKER_WORK_DIRECTORY, 'occ'] | path_join }}"
|
||||
NEXTCLOUD_DOCKER_EXEC: "docker exec -u {{ NEXTCLOUD_DOCKER_USER }} {{ NEXTCLOUD_CONTAINER }}" # General execute composition
|
||||
NEXTCLOUD_DOCKER_EXEC_OCC: "{{ NEXTCLOUD_DOCKER_EXEC }} {{ NEXTCLOUD_INTERNAL_OCC_COMMAND }}" # Execute docker occ command
|
||||
|
||||
## Redis
|
||||
NEXTCLOUD_REDIS_CONTAINER: "{{ entity_name }}-redis"
|
||||
@@ -23,7 +23,7 @@ server:
|
||||
flags:
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
whitelist:
|
||||
font-src:
|
||||
|
||||
@@ -17,11 +17,6 @@ server:
|
||||
flags:
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
#script-src:
|
||||
# unsafe-inline: true
|
||||
# unsafe-eval: true
|
||||
#style-src:
|
||||
# unsafe-inline: true
|
||||
whitelist:
|
||||
font-src: []
|
||||
connect-src: []
|
||||
|
||||
@@ -10,9 +10,9 @@ server:
|
||||
flags:
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-inline: true
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
whitelist:
|
||||
frame-ancestors:
|
||||
@@ -30,6 +30,10 @@ docker:
|
||||
services:
|
||||
redis:
|
||||
enabled: true
|
||||
cpus: "0.5"
|
||||
mem_reservation: "256m"
|
||||
mem_limit: "512m"
|
||||
pids_limit: 512
|
||||
database:
|
||||
enabled: true
|
||||
peertube:
|
||||
@@ -38,6 +42,10 @@ docker:
|
||||
image: "chocobozzz/peertube"
|
||||
backup:
|
||||
no_stop_required: true
|
||||
cpus: 4
|
||||
mem_reservation: "4g"
|
||||
mem_limit: "8g"
|
||||
pids_limit: 2048 # ffmpeg spawnt Threads/Prozesse
|
||||
volumes:
|
||||
data: peertube_data
|
||||
config: peertube_config
|
||||
@@ -12,6 +12,17 @@
|
||||
- assets:/app/client/dist
|
||||
- data:/data
|
||||
- config:/config
|
||||
environment:
|
||||
- NODE_OPTIONS=--max-old-space-size={{ PEERTUBE_MAX_OLD_SPACE_SIZE }}
|
||||
- PEERTUBE_TRANSCODING_CONCURRENCY={{ PEERTUBE_TRANSCODING_CONCURRENCY }}
|
||||
shm_size: "512m"
|
||||
tmpfs:
|
||||
- /tmp:size=1g,exec
|
||||
ulimits:
|
||||
nofile:
|
||||
soft: 131072
|
||||
hard: 131072
|
||||
nproc: 8192
|
||||
{% include 'roles/docker-container/templates/depends_on/dmbs_excl.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/healthcheck/tcp.yml.j2' %}
|
||||
|
||||
@@ -1,17 +1,47 @@
|
||||
# General
|
||||
application_id: "web-app-peertube"
|
||||
database_type: "postgres"
|
||||
application_id: "web-app-peertube"
|
||||
database_type: "postgres"
|
||||
|
||||
# Docker
|
||||
docker_compose_flush_handlers: true
|
||||
docker_compose_flush_handlers: true
|
||||
|
||||
# Role variables
|
||||
PEERTUBE_VERSION: "{{ applications | get_app_conf(application_id, 'docker.services.peertube.version') }}"
|
||||
PEERTUBE_IMAGE: "{{ applications | get_app_conf(application_id, 'docker.services.peertube.image') }}"
|
||||
PEERTUBE_CONTAINER: "{{ applications | get_app_conf(application_id, 'docker.services.peertube.name') }}"
|
||||
PEERTUBE_DATA_VOLUME: "{{ applications | get_app_conf(application_id, 'docker.volumes.data') }}"
|
||||
PEERTUBE_CONFIG_VOLUME: "{{ applications | get_app_conf(application_id, 'docker.volumes.config') }}"
|
||||
PEERTUBE_VERSION: "{{ applications | get_app_conf(application_id, 'docker.services.peertube.version') }}"
|
||||
PEERTUBE_IMAGE: "{{ applications | get_app_conf(application_id, 'docker.services.peertube.image') }}"
|
||||
PEERTUBE_CONTAINER: "{{ applications | get_app_conf(application_id, 'docker.services.peertube.name') }}"
|
||||
PEERTUBE_DATA_VOLUME: "{{ applications | get_app_conf(application_id, 'docker.volumes.data') }}"
|
||||
PEERTUBE_CONFIG_VOLUME: "{{ applications | get_app_conf(application_id, 'docker.volumes.config') }}"
|
||||
|
||||
# OIDC
|
||||
PEERTUBE_OIDC_PLUGIN: "peertube-plugin-auth-openid-connect"
|
||||
PEERTUBE_OIDC_ENABLED: "{{ applications | get_app_conf(application_id, 'features.oidc', False) }}"
|
||||
PEERTUBE_OIDC_PLUGIN: "peertube-plugin-auth-openid-connect"
|
||||
PEERTUBE_OIDC_ENABLED: "{{ applications | get_app_conf(application_id, 'features.oidc') }}"
|
||||
|
||||
# === Dynamic performance defaults ==========================================
|
||||
|
||||
# Raw Docker configuration values (with sane fallbacks)
|
||||
peertube_cpus: "{{ applications | get_app_conf(application_id, 'docker.services.peertube.cpus') | float }}"
|
||||
peertube_mem_limit_raw: "{{ applications | get_app_conf(application_id, 'docker.services.peertube.mem_limit') }}"
|
||||
peertube_mem_bytes: "{{ peertube_mem_limit_raw | human_to_bytes }}"
|
||||
peertube_mem_mb: "{{ ((peertube_mem_bytes | int) // (1024 * 1024)) | int }}"
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Node heap size:
|
||||
# ~35% of total RAM, but at least 768 MB, at most 3072 MB,
|
||||
# and never more than 60% of total memory (safety cap for small containers)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
_peertube_heap_candidate_mb: "{{ ((peertube_mem_mb | float) * 0.35) | round(0, 'floor') | int }}"
|
||||
_peertube_heap_cap_mb: "{{ ((peertube_mem_mb | float) * 0.60) | round(0, 'floor') | int }}"
|
||||
|
||||
# Step 1: enforce minimum (≥768 MB)
|
||||
_peertube_heap_min_applied: "{{ [ (_peertube_heap_candidate_mb | int), 768 ] | max }}"
|
||||
|
||||
# Step 2: determine hard cap (min of 3072 MB and 60% of total memory)
|
||||
_peertube_heap_hardcap: "{{ [ 3072, (_peertube_heap_cap_mb | int) ] | min }}"
|
||||
|
||||
# Step 3: final heap = min(min-applied, hardcap)
|
||||
PEERTUBE_MAX_OLD_SPACE_SIZE: "{{ [ (_peertube_heap_min_applied | int), (_peertube_heap_hardcap | int) ] | min }}"
|
||||
|
||||
# Transcoding concurrency: half the vCPUs; min 1, max 8
|
||||
_peertube_concurrency_candidate: "{{ ((peertube_cpus | float) * 0.5) | round(0, 'floor') | int }}"
|
||||
PEERTUBE_TRANSCODING_CONCURRENCY: "{{ [ ( [ (_peertube_concurrency_candidate | int), 1 ] | max ), 8 ] | min }}"
|
||||
|
||||
@@ -16,7 +16,7 @@ features:
|
||||
server:
|
||||
csp:
|
||||
flags:
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
|
||||
@@ -15,7 +15,7 @@ features:
|
||||
server:
|
||||
csp:
|
||||
flags:
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
|
||||
@@ -9,13 +9,13 @@ features:
|
||||
server:
|
||||
csp:
|
||||
flags:
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-eval: true
|
||||
unsafe-inline: true
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
unsafe-eval: true
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
whitelist:
|
||||
frame-ancestors:
|
||||
|
||||
34
roles/web-app-shopware/README.md
Normal file
34
roles/web-app-shopware/README.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# Shopware
|
||||
|
||||
## Description
|
||||
|
||||
Empower your e-commerce vision with **Shopware 6**, a modern, flexible, and open-source commerce platform built on **Symfony and Vue.js**. Designed for growth and innovation, it enables seamless integration, outstanding customer experiences, and complete control over your digital business. Build, scale, and sell with confidence.
|
||||
|
||||
## Overview
|
||||
|
||||
This role deploys **Shopware 6** using **Docker**. It automates installation, migration, and configuration of your storefront, integrating with a central **MariaDB** database.
|
||||
Optional components like **Redis** and **OpenSearch** enhance performance and search capabilities, while **OIDC** and **LDAP** support integration with centralized identity systems such as **Keycloak**.
|
||||
|
||||
With automated setup, update handling, variable management, and plugin-based authentication, this role simplifies the deployment and maintenance of your Shopware instance.
|
||||
|
||||
## Features
|
||||
|
||||
* **Modern and Scalable:** A robust Symfony-based framework optimized for commerce innovation.
|
||||
* **Automated Setup & Maintenance:** Installs, migrates, and configures Shopware automatically.
|
||||
* **Extensible Architecture:** Optional Redis, OpenSearch, and plugin-based IAM integrations.
|
||||
* **Centralized Database Access:** Connects seamlessly to the shared MariaDB service.
|
||||
* **Integrated Configuration:** Environment and Docker Compose variables managed automatically.
|
||||
|
||||
## Further Resources
|
||||
|
||||
* [Shopware Official Website](https://www.shopware.com/en/)
|
||||
* [Shopware Developer Documentation](https://developer.shopware.com/)
|
||||
* [Shopware Store (Plugins)](https://store.shopware.com/en/)
|
||||
|
||||
## Credits
|
||||
|
||||
Developed and maintained by **Kevin Veen-Birkenbach**.
|
||||
Learn more at [veen.world](https://www.veen.world).
|
||||
|
||||
Part of the [Infinito.Nexus Project](https://s.infinito.nexus/code)
|
||||
Licensed under [Infinito.Nexus NonCommercial License](https://s.infinito.nexus/license).
|
||||
3
roles/web-app-shopware/TODO.md
Normal file
3
roles/web-app-shopware/TODO.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# to-dos
|
||||
- Implement OIDC
|
||||
- Implement LDAP
|
||||
80
roles/web-app-shopware/config/main.yml
Normal file
80
roles/web-app-shopware/config/main.yml
Normal file
@@ -0,0 +1,80 @@
|
||||
title: "{{ SOFTWARE_NAME }} Shop"
|
||||
features:
|
||||
central_database: true
|
||||
redis: true
|
||||
ldap: false # Not implemented yet
|
||||
oidc: false # Not implemented yet
|
||||
logout: true
|
||||
desktop: true
|
||||
css: true
|
||||
server:
|
||||
csp:
|
||||
flags:
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
unsafe-eval: true
|
||||
whitelist:
|
||||
font-src:
|
||||
- "data:"
|
||||
domains:
|
||||
aliases: []
|
||||
canonical:
|
||||
- shop.{{ PRIMARY_DOMAIN }}
|
||||
docker:
|
||||
services:
|
||||
database:
|
||||
enabled: true
|
||||
|
||||
init:
|
||||
name: software-init
|
||||
cpus: 1.0
|
||||
mem_reservation: 1g
|
||||
mem_limit: 2g
|
||||
|
||||
|
||||
# Base PHP image used by all app services
|
||||
shopware:
|
||||
image: "ghcr.io/shopware/docker-base"
|
||||
version: "8.3"
|
||||
|
||||
web:
|
||||
name: "shopware-web"
|
||||
port: 8000
|
||||
cpus: 1.0
|
||||
mem_reservation: 1g
|
||||
mem_limit: 2g
|
||||
|
||||
worker:
|
||||
name: "shopware-worker"
|
||||
entrypoint: [ "php", "bin/console", "messenger:consume", "async", "low_priority", "--time-limit=300", "--memory-limit=512M" ]
|
||||
replicas: 3
|
||||
cpus: 1.0
|
||||
mem_reservation: 1g
|
||||
mem_limit: 2g
|
||||
|
||||
scheduler:
|
||||
name: "shopware-scheduler"
|
||||
entrypoint: [ "php", "bin/console", "scheduled-task:run" ]
|
||||
cpus: 0.5
|
||||
mem_reservation: 512m
|
||||
mem_limit: 1g
|
||||
|
||||
redis:
|
||||
enabled: true
|
||||
image: "redis"
|
||||
version: "7-alpine"
|
||||
cpus: 0.25
|
||||
mem_reservation: 256m
|
||||
mem_limit: 512m
|
||||
|
||||
opensearch:
|
||||
enabled: true
|
||||
image: "opensearchproject/opensearch"
|
||||
version: "2.12.0"
|
||||
name: "shopware-opensearch"
|
||||
cpus: 1.0
|
||||
mem_reservation: 2g
|
||||
mem_limit: 4g
|
||||
|
||||
volumes:
|
||||
data: "shopware_data"
|
||||
140
roles/web-app-shopware/files/init.sh
Normal file
140
roles/web-app-shopware/files/init.sh
Normal file
@@ -0,0 +1,140 @@
|
||||
#!/bin/sh
|
||||
# Shopware initialization script (POSIX sh)
|
||||
# - Root phase: fix volumes & permissions, then switch to www-data
|
||||
# - First run: perform system:install
|
||||
# - Every run: run DB migrations + rebuild cache + compile assets & themes
|
||||
# - Verifies admin bundles exist, otherwise exits with error
|
||||
|
||||
set -eu
|
||||
|
||||
APP_ROOT="/var/www/html"
|
||||
MARKER="$APP_ROOT/.infinito/installed"
|
||||
LOG_PREFIX="[INIT]"
|
||||
PHP_BIN="php"
|
||||
|
||||
log() { printf "%s %s\n" "$LOG_PREFIX" "$1"; }
|
||||
fail() { printf "%s [ERROR] %s\n" "$LOG_PREFIX" "$1" >&2; exit 1; }
|
||||
|
||||
# ---------------------------
|
||||
# 0) Root phase (if running as root)
|
||||
# ---------------------------
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
# Prepare required folders and shared volumes
|
||||
mkdir -p "$APP_ROOT/.infinito" \
|
||||
"$APP_ROOT/public/bundles" \
|
||||
"$APP_ROOT/public/media" \
|
||||
"$APP_ROOT/public/theme" \
|
||||
"$APP_ROOT/public/thumbnail" \
|
||||
"$APP_ROOT/public/sitemap" \
|
||||
"$APP_ROOT/var"
|
||||
|
||||
log "Fixing permissions on shared volumes..."
|
||||
chown -R www-data:www-data "$APP_ROOT/public" "$APP_ROOT/var" || true
|
||||
chmod -R 775 "$APP_ROOT/public" "$APP_ROOT/var" || true
|
||||
|
||||
# Switch to www-data for all subsequent operations
|
||||
exec su -s /bin/sh www-data "$0" "$@"
|
||||
fi
|
||||
|
||||
# From here on: running as www-data
|
||||
cd "$APP_ROOT" || fail "Cannot cd to $APP_ROOT"
|
||||
|
||||
# Optional environment hints
|
||||
APP_ENV_STR=$($PHP_BIN -r 'echo getenv("APP_ENV") ?: "";' 2>/dev/null || true)
|
||||
APP_URL_STR=$($PHP_BIN -r 'echo getenv("APP_URL") ?: "";' 2>/dev/null || true)
|
||||
[ -n "$APP_ENV_STR" ] || log "APP_ENV not set (using defaults)"
|
||||
[ -n "$APP_URL_STR" ] || log "APP_URL not set (reverse proxy must set headers)"
|
||||
|
||||
# ---------------------------
|
||||
# 1) Database reachability check (PDO)
|
||||
# ---------------------------
|
||||
log "Checking database via PDO..."
|
||||
$PHP_BIN -r '
|
||||
$url = getenv("DATABASE_URL");
|
||||
if (!$url) { fwrite(STDERR, "DATABASE_URL not set\n"); exit(1); }
|
||||
$p = parse_url($url);
|
||||
if (!$p || !isset($p["scheme"])) { fwrite(STDERR, "Invalid DATABASE_URL\n"); exit(1); }
|
||||
$host = $p["host"] ?? "localhost";
|
||||
$port = $p["port"] ?? 3306;
|
||||
$db = ltrim($p["path"] ?? "", "/");
|
||||
$user = $p["user"] ?? "";
|
||||
$pass = $p["pass"] ?? "";
|
||||
$dsn = "mysql:host=".$host.";port=".$port.";dbname=".$db.";charset=utf8mb4";
|
||||
$retries = 60;
|
||||
while ($retries-- > 0) {
|
||||
try { new PDO($dsn, $user, $pass, [PDO::ATTR_TIMEOUT => 3]); exit(0); }
|
||||
catch (Exception $e) { sleep(2); }
|
||||
}
|
||||
fwrite(STDERR, "DB not reachable\n"); exit(1);
|
||||
' || fail "Database not reachable"
|
||||
|
||||
# ---------------------------
|
||||
# 2) First-time install detection
|
||||
# ---------------------------
|
||||
FIRST_INSTALL=0
|
||||
if [ ! -f "$MARKER" ]; then
|
||||
log "Checking if database is empty..."
|
||||
if $PHP_BIN -r '
|
||||
$url = getenv("DATABASE_URL");
|
||||
$p = parse_url($url);
|
||||
$db = ltrim($p["path"] ?? "", "/");
|
||||
$dsn = "mysql:host=".($p["host"]??"localhost").";port=".($p["port"]??3306).";dbname=".$db.";charset=utf8mb4";
|
||||
$pdo = new PDO($dsn, $p["user"] ?? "", $p["pass"] ?? "");
|
||||
$q = $pdo->query("SELECT COUNT(*) FROM information_schema.tables WHERE table_schema=".$pdo->quote($db));
|
||||
$cnt = (int)$q->fetchColumn();
|
||||
exit($cnt === 0 ? 0 : 100);
|
||||
'; then
|
||||
FIRST_INSTALL=1
|
||||
else
|
||||
ST=$?
|
||||
if [ "$ST" -eq 100 ]; then
|
||||
log "Database not empty → skipping install"
|
||||
else
|
||||
fail "Database check failed (exit code $ST)"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$FIRST_INSTALL" -eq 1 ]; then
|
||||
log "Performing first-time Shopware installation..."
|
||||
$PHP_BIN -d memory_limit=1024M bin/console system:install --basic-setup --create-database
|
||||
mkdir -p "$(dirname "$MARKER")"
|
||||
: > "$MARKER"
|
||||
fi
|
||||
|
||||
# ---------------------------
|
||||
# 3) Always run migrations
|
||||
# ---------------------------
|
||||
log "Running database migrations..."
|
||||
$PHP_BIN -d memory_limit=1024M bin/console database:migrate --all
|
||||
$PHP_BIN -d memory_limit=1024M bin/console database:migrate-destructive --all
|
||||
|
||||
# ---------------------------
|
||||
# 4) Always rebuild caches, bundles, and themes
|
||||
# ---------------------------
|
||||
log "Rebuilding caches and assets..."
|
||||
$PHP_BIN bin/console cache:clear
|
||||
$PHP_BIN bin/console bundle:dump
|
||||
# Use --copy if symlinks cause issues
|
||||
$PHP_BIN bin/console assets:install --no-interaction --force
|
||||
$PHP_BIN bin/console theme:refresh
|
||||
$PHP_BIN bin/console theme:compile
|
||||
# Best-effort: not critical if it fails
|
||||
$PHP_BIN bin/console dal:refresh:index || log "dal:refresh:index failed (non-critical)"
|
||||
|
||||
# ---------------------------
|
||||
# 5) Verify admin bundles
|
||||
# ---------------------------
|
||||
if [ ! -d "public/bundles/administration" ]; then
|
||||
fail "Missing directory public/bundles/administration (asset build failed)"
|
||||
fi
|
||||
if ! ls public/bundles/administration/* >/dev/null 2>&1; then
|
||||
fail "No files found in public/bundles/administration (asset build failed)"
|
||||
fi
|
||||
|
||||
# ---------------------------
|
||||
# 6) Show version info
|
||||
# ---------------------------
|
||||
$PHP_BIN bin/console system:version 2>/dev/null || log "system:version not available"
|
||||
|
||||
log "Initialization complete."
|
||||
22
roles/web-app-shopware/meta/main.yml
Normal file
22
roles/web-app-shopware/meta/main.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
galaxy_info:
|
||||
author: "Kevin Veen-Birkenbach"
|
||||
description: "Shopware is a modern open-source eCommerce platform built on PHP and Symfony. It enables businesses to create scalable online stores with flexible product management, intuitive administration, customizable storefronts, and powerful APIs for headless and omnichannel commerce."
|
||||
license: "Infinito.Nexus NonCommercial License"
|
||||
license_url: "https://s.infinito.nexus/license"
|
||||
company: |
|
||||
Kevin Veen-Birkenbach
|
||||
Consulting & Coaching Solutions
|
||||
https://www.veen.world
|
||||
galaxy_tags:
|
||||
- shopware
|
||||
- ecommerce
|
||||
repository: https://s.infinito.nexus/code
|
||||
issue_tracker_url: https://s.infinito.nexus/issues
|
||||
documentation: "https://docs.infinito.nexus/"
|
||||
logo:
|
||||
class: "fa-solid fa-cart-shopping"
|
||||
run_after:
|
||||
- web-app-keycloak
|
||||
- web-app-mailu
|
||||
dependencies: []
|
||||
2
roles/web-app-shopware/schema/main.yml
Normal file
2
roles/web-app-shopware/schema/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
# Minimal schema placeholder (extend with your own config contract if desired)
|
||||
credentials: {}
|
||||
38
roles/web-app-shopware/tasks/01_admin.yml
Normal file
38
roles/web-app-shopware/tasks/01_admin.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
- name: "Rename default Shopware admin user to {{ users.administrator.username }}"
|
||||
shell: |
|
||||
docker exec -i --user {{ SHOPWARE_USER }} {{ SHOPWARE_WEB_CONTAINER }} sh -lc '
|
||||
set -e
|
||||
cd {{ SHOPWARE_ROOT }}
|
||||
old_user="admin"
|
||||
new_user="{{ users.administrator.username }}"
|
||||
if php bin/console user:list | grep -q "^$old_user "; then
|
||||
echo "[INFO] Renaming Shopware user: $old_user -> $new_user"
|
||||
php bin/console user:update "$old_user" --username="$new_user" || true
|
||||
else
|
||||
echo "[INFO] No user named $old_user found (already renamed or custom setup)"
|
||||
fi
|
||||
'
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
changed_when: false
|
||||
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
||||
|
||||
- name: "Ensure Shopware admin exists and has the desired password"
|
||||
shell: |
|
||||
docker exec -i --user {{ SHOPWARE_USER }} {{ SHOPWARE_WEB_CONTAINER }} sh -lc '
|
||||
set -e
|
||||
cd {{ SHOPWARE_ROOT }}
|
||||
php bin/console user:create "{{ users.administrator.username }}" \
|
||||
--admin \
|
||||
--password="{{ users.administrator.password }}" \
|
||||
--firstName="{{ users.administrator.username }}" \
|
||||
--lastName="{{ PRIMARY_DOMAIN | lower }}" \
|
||||
--email="{{ users.administrator.email }}" || true
|
||||
php bin/console user:change-password "{{ users.administrator.username }}" \
|
||||
--password="{{ users.administrator.password }}" || true
|
||||
php bin/console user:update "{{ users.administrator.username }}" \
|
||||
--email="{{ users.administrator.email }}" 2>/dev/null || true
|
||||
'
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
||||
7
roles/web-app-shopware/tasks/02_setup.yml
Normal file
7
roles/web-app-shopware/tasks/02_setup.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
- name: Install & configure OIDC plugin (if enabled)
|
||||
include_tasks: setup/oidc.yml
|
||||
when: applications | get_app_conf(application_id, 'features.oidc')
|
||||
|
||||
- name: Install & configure LDAP plugin (if enabled)
|
||||
include_tasks: setup/ldap.yml
|
||||
when: applications | get_app_conf(application_id, 'features.ldap')
|
||||
7
roles/web-app-shopware/tasks/03_cleanup.yml
Normal file
7
roles/web-app-shopware/tasks/03_cleanup.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
- name: Remove OIDC plugin if disabled
|
||||
include_tasks: cleanup/oidc.yml
|
||||
when: not (applications | get_app_conf(application_id, 'features.oidc'))
|
||||
|
||||
- name: Remove LDAP plugin if disabled
|
||||
include_tasks: cleanup/ldap.yml
|
||||
when: not (applications | get_app_conf(application_id, 'features.ldap'))
|
||||
10
roles/web-app-shopware/tasks/cleanup/ldap.yml
Normal file
10
roles/web-app-shopware/tasks/cleanup/ldap.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
- name: "Deactivate/uninstall LDAP plugin if present"
|
||||
shell: |
|
||||
docker exec -i --user {{ SHOPWARE_USER }} {{ SHOPWARE_WEB_CONTAINER }} sh -lc '
|
||||
cd {{ SHOPWARE_ROOT }}
|
||||
php bin/console plugin:deactivate INFX_LDAP_PLUGIN || true
|
||||
php bin/console plugin:uninstall INFX_LDAP_PLUGIN --keep-user-data || true
|
||||
php bin/console cache:clear
|
||||
'
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
10
roles/web-app-shopware/tasks/cleanup/oidc.yml
Normal file
10
roles/web-app-shopware/tasks/cleanup/oidc.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
- name: "Deactivate/uninstall OIDC plugin if present"
|
||||
shell: |
|
||||
docker exec -i --user {{ SHOPWARE_USER }} {{ SHOPWARE_WEB_CONTAINER }} sh -lc '
|
||||
cd {{ SHOPWARE_ROOT }}
|
||||
php bin/console plugin:deactivate INFX_OIDC_PLUGIN || true
|
||||
php bin/console plugin:uninstall INFX_OIDC_PLUGIN --keep-user-data || true
|
||||
php bin/console cache:clear
|
||||
'
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
35
roles/web-app-shopware/tasks/main.yml
Normal file
35
roles/web-app-shopware/tasks/main.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
- name: "Load docker, DB and proxy for {{ application_id }}"
|
||||
include_role:
|
||||
name: sys-stk-full-stateful
|
||||
vars:
|
||||
docker_compose_flush_handlers: false
|
||||
|
||||
- name: "Deploy {{ SHOPWARE_INIT_HOST }}"
|
||||
copy:
|
||||
src: init.sh
|
||||
dest: "{{ SHOPWARE_INIT_HOST }}"
|
||||
mode: "0755"
|
||||
notify:
|
||||
- docker compose up
|
||||
- docker compose build
|
||||
|
||||
- name: "Flush docker compose handlers"
|
||||
meta: flush_handlers
|
||||
|
||||
- name: Wait for Shopware HTTP endpoint
|
||||
wait_for:
|
||||
host: "127.0.0.1"
|
||||
port: "{{ ports.localhost.http[application_id] }}"
|
||||
delay: 5
|
||||
timeout: 300
|
||||
|
||||
- name: "Ensure admin user exists with correct password"
|
||||
include_tasks: 01_admin.yml
|
||||
|
||||
#- name: Execute setup routines (OIDC/LDAP)
|
||||
# include_tasks: 02_setup.yml
|
||||
#
|
||||
#- name: Execute cleanup routines
|
||||
# include_tasks: 03_cleanup.yml
|
||||
# when: MODE_CLEANUP
|
||||
27
roles/web-app-shopware/tasks/setup/ldap.yml
Normal file
27
roles/web-app-shopware/tasks/setup/ldap.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
# Replace INFX_LDAP_PLUGIN with the actual plugin name you use
|
||||
- name: "Install LDAP admin plugin & activate"
|
||||
shell: |
|
||||
docker exec -i --user {{ SHOPWARE_USER }} {{ SHOPWARE_WEB_CONTAINER }} sh -lc '
|
||||
set -e
|
||||
cd {{ SHOPWARE_ROOT }}
|
||||
php bin/console plugin:refresh
|
||||
php bin/console plugin:install --activate INFX_LDAP_PLUGIN || true
|
||||
php bin/console cache:clear
|
||||
'
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
|
||||
- name: "Configure LDAP connection"
|
||||
shell: |
|
||||
docker exec -i --user {{ SHOPWARE_USER }} {{ SHOPWARE_WEB_CONTAINER }} sh -lc '
|
||||
set -e
|
||||
cd {{ SHOPWARE_ROOT }}
|
||||
php bin/console system:config:set "InfxLdap.config.host" "{{ LDAP.SERVER.DOMAIN }}"
|
||||
php bin/console system:config:set "InfxLdap.config.port" "{{ LDAP.SERVER.PORT }}"
|
||||
php bin/console system:config:set "InfxLdap.config.bindDn" "{{ LDAP.DN.ADMINISTRATOR.DATA }}"
|
||||
php bin/console system:config:set "InfxLdap.config.password" "{{ LDAP.BIND_CREDENTIAL }}"
|
||||
php bin/console system:config:set "InfxLdap.config.userBase" "{{ LDAP.DN.OU.USERS }}"
|
||||
php bin/console cache:clear
|
||||
'
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
26
roles/web-app-shopware/tasks/setup/oidc.yml
Normal file
26
roles/web-app-shopware/tasks/setup/oidc.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
# Replace INFX_OIDC_PLUGIN with the actual plugin name (Composer or local)
|
||||
- name: "Install OIDC plugin & activate"
|
||||
shell: |
|
||||
docker exec -i --user {{ SHOPWARE_USER }} {{ SHOPWARE_WEB_CONTAINER }} sh -lc '
|
||||
set -e
|
||||
cd {{ SHOPWARE_ROOT }}
|
||||
php bin/console plugin:refresh
|
||||
php bin/console plugin:install --activate INFX_OIDC_PLUGIN || true
|
||||
php bin/console cache:clear
|
||||
'
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
|
||||
- name: "Configure OIDC via system:config"
|
||||
shell: |
|
||||
docker exec -i --user {{ SHOPWARE_USER }} {{ SHOPWARE_WEB_CONTAINER }} sh -lc '
|
||||
set -e
|
||||
cd {{ SHOPWARE_ROOT }}
|
||||
php bin/console system:config:set "InfxOidc.config.clientId" "{{ OIDC.CLIENT.ID }}"
|
||||
php bin/console system:config:set "InfxOidc.config.clientSecret" "{{ OIDC.CLIENT.SECRET }}"
|
||||
php bin/console system:config:set "InfxOidc.config.discoveryUrl" "{{ OIDC.CLIENT.DISCOVERY_DOCUMENT }}"
|
||||
php bin/console system:config:set "InfxOidc.config.scopes" "openid profile email"
|
||||
php bin/console cache:clear
|
||||
'
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
92
roles/web-app-shopware/templates/Dockerfile.j2
Normal file
92
roles/web-app-shopware/templates/Dockerfile.j2
Normal file
@@ -0,0 +1,92 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# Shopware Application Image (Alpine-compatible)
|
||||
# ------------------------------------------------------------------------------
|
||||
# - Stage 1 (builder): use Composer to fetch Shopware while ignoring build-time
|
||||
# PHP extensions (we'll install them in the runtime image).
|
||||
# - Stage 2 (runtime): install required PHP extensions and copy the app + init.sh
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
############################
|
||||
# Stage 1: Builder
|
||||
############################
|
||||
FROM composer:2.7 AS builder
|
||||
ENV COMPOSER_ALLOW_SUPERUSER=1 \
|
||||
COMPOSER_NO_INTERACTION=1 \
|
||||
COMPOSER_PROCESS_TIMEOUT=900
|
||||
|
||||
WORKDIR /app
|
||||
ARG SHOPWARE_PROD_VERSION=shopware/production:6.7.3.1
|
||||
|
||||
# 1) Scaffold project without installing dependencies
|
||||
RUN set -eux; \
|
||||
composer create-project "${SHOPWARE_PROD_VERSION}" /app --no-install
|
||||
|
||||
# 2) Install dependencies (ignoring build-time extension checks) + add Redis transport
|
||||
RUN set -eux; \
|
||||
composer install \
|
||||
--no-dev \
|
||||
--optimize-autoloader \
|
||||
--no-progress \
|
||||
--no-scripts \
|
||||
--ignore-platform-req=ext-gd \
|
||||
--ignore-platform-req=ext-intl \
|
||||
--ignore-platform-req=ext-pdo_mysql; \
|
||||
composer require symfony/redis-messenger:^6.4 \
|
||||
-W \
|
||||
--no-scripts \
|
||||
--no-progress \
|
||||
--update-no-dev \
|
||||
--ignore-platform-req=ext-gd \
|
||||
--ignore-platform-req=ext-intl \
|
||||
--ignore-platform-req=ext-pdo_mysql \
|
||||
--ignore-platform-req=ext-redis
|
||||
|
||||
|
||||
############################
|
||||
# Stage 2: Runtime
|
||||
############################
|
||||
FROM ghcr.io/shopware/docker-base:8.3
|
||||
WORKDIR /var/www/html
|
||||
|
||||
# Install required PHP extensions in the Alpine-based runtime
|
||||
# (try php83-*, fall back to php82-*, then to generic)
|
||||
USER root
|
||||
RUN set -eux; \
|
||||
apk add --no-cache php83-gd || apk add --no-cache php82-gd || apk add --no-cache php-gd || true; \
|
||||
apk add --no-cache php83-intl || apk add --no-cache php82-intl || apk add --no-cache php-intl || true; \
|
||||
apk add --no-cache php83-pdo_mysql || apk add --no-cache php82-pdo_mysql || apk add --no-cache php-pdo_mysql || true; \
|
||||
apk add --no-cache php83-redis || apk add --no-cache php82-redis || apk add --no-cache php-redis || true
|
||||
|
||||
# Copy built application from the builder
|
||||
COPY --chown=www-data:www-data --from=builder /app /var/www/html
|
||||
|
||||
# Optional: snapshot of pristine app to seed an empty volume (used by init container)
|
||||
RUN mkdir -p /usr/src/shopware \
|
||||
&& cp -a /var/www/html/. /usr/src/shopware/. \
|
||||
&& chown -R www-data:www-data /var/www/html /usr/src/shopware
|
||||
|
||||
# Ensure writable directories exist with correct ownership
|
||||
RUN set -eux; \
|
||||
mkdir -p \
|
||||
/var/www/html/files \
|
||||
/var/www/html/var \
|
||||
/var/www/html/public/media \
|
||||
/var/www/html/public/thumbnail \
|
||||
/var/www/html/public/sitemap \
|
||||
/var/www/html/public/theme; \
|
||||
chown -R www-data:www-data /var/www/html
|
||||
|
||||
# Add trusted proxies wiring (Symfony reads env TRUSTED_PROXIES)
|
||||
RUN set -eux; \
|
||||
mkdir -p /var/www/html/config/packages; \
|
||||
if [ ! -f /var/www/html/config/packages/framework.yaml ]; then \
|
||||
printf "framework:\n trusted_proxies: '%%env(TRUSTED_PROXIES)%%'\n" > /var/www/html/config/packages/framework.yaml; \
|
||||
fi
|
||||
|
||||
# Drop back to the app user
|
||||
USER www-data
|
||||
|
||||
# Expose internal port & add a lightweight healthcheck
|
||||
EXPOSE 8000
|
||||
HEALTHCHECK --interval=30s --timeout=5s --retries=5 --start-period=20s \
|
||||
CMD php -r '$s=@fsockopen("127.0.0.1", 8000, $e, $t, 3); if(!$s) exit(1); fclose($s);'
|
||||
121
roles/web-app-shopware/templates/docker-compose.yml.j2
Normal file
121
roles/web-app-shopware/templates/docker-compose.yml.j2
Normal file
@@ -0,0 +1,121 @@
|
||||
x-environment: &shopware
|
||||
image: "{{ SHOPWARE_CUSTOM_IMAGE }}"
|
||||
volumes:
|
||||
- files:/var/www/html/files
|
||||
- theme:/var/www/html/public/theme
|
||||
- media:/var/www/html/public/media
|
||||
- thumbnail:/var/www/html/public/thumbnail
|
||||
- sitemap:/var/www/html/public/sitemap
|
||||
- "{{ SHOPWARE_INIT_HOST }}:{{ SHOPWARE_INIT_DOCKER }}:ro"
|
||||
- bundles:/var/www/html/public/bundles
|
||||
working_dir: {{ SHOPWARE_ROOT }}
|
||||
|
||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||
|
||||
# -------------------------
|
||||
# INIT (runs once per deployment)
|
||||
# -------------------------
|
||||
{% set service_name = 'init' %}
|
||||
{% set docker_restart_policy = 'no' %}
|
||||
{{ service_name }}:
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
{% set docker_restart_policy = DOCKER_RESTART_POLICY %}
|
||||
<<: *shopware
|
||||
container_name: "{{ SHOPWARE_INIT_CONTAINER }}"
|
||||
entrypoint: [ "sh", "{{ SHOPWARE_INIT_DOCKER }}" ]
|
||||
user: "0:0"
|
||||
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
|
||||
{# -------------------------
|
||||
WEB (serves HTTP on 8000)
|
||||
------------------------- #}
|
||||
{% set service_name = 'web' %}
|
||||
{% set container_port = applications | get_app_conf(application_id, 'docker.services.web.port') %}
|
||||
{{ service_name }}:
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
<<: *shopware
|
||||
{{ lookup('template', 'roles/docker-container/templates/build.yml.j2') | indent(4) }}
|
||||
container_name: "{{ SHOPWARE_WEB_CONTAINER }}"
|
||||
ports:
|
||||
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}"
|
||||
depends_on:
|
||||
init:
|
||||
condition: service_completed_successfully
|
||||
{% filter indent(4) %}
|
||||
{% include 'roles/docker-container/templates/healthcheck/http.yml.j2' %}
|
||||
{% endfilter %}
|
||||
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
|
||||
{# -------------------------
|
||||
WORKER (async queues)
|
||||
------------------------- #}
|
||||
{% set service_name = 'worker' %}
|
||||
{{ service_name }}:
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
<<: *shopware
|
||||
container_name: "{{ SHOPWARE_WORKER_CONTAINER }}"
|
||||
pull_policy: never
|
||||
entrypoint: {{ SHOPWARE_WORKER_ENTRYPOINT }}
|
||||
depends_on:
|
||||
init:
|
||||
condition: service_completed_successfully
|
||||
# @todo Activate for swarm deploy
|
||||
# deploy:
|
||||
# replicas: {{ SHOPWARE_WORKER_REPLICAS }}
|
||||
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
|
||||
{# -------------------------
|
||||
SCHEDULER (cron-like)
|
||||
------------------------- #}
|
||||
{% set service_name = 'scheduler' %}
|
||||
{{ service_name }}:
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
<<: *shopware
|
||||
container_name: "{{ SHOPWARE_SCHED_CONTAINER }}"
|
||||
pull_policy: never
|
||||
entrypoint: {{ SHOPWARE_SCHED_ENTRYPOINT }}
|
||||
depends_on:
|
||||
init:
|
||||
condition: service_completed_successfully
|
||||
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
|
||||
{% if SHOPWARE_OPENSEARCH_ENABLED %}
|
||||
{% set service_name = 'opensearch' %}
|
||||
{{ service_name }}:
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
image: "{{ SHOPWARE_OPENSEARCH_IMAGE }}:{{ SHOPWARE_OPENSEARCH_VERSION }}"
|
||||
container_name: "{{ SHOPWARE_OPENSEARCH_CONTAINER }}"
|
||||
environment:
|
||||
- discovery.type=single-node
|
||||
- plugins.security.disabled=true
|
||||
- bootstrap.memory_lock=true
|
||||
- OPENSEARCH_JAVA_OPTS=-Xms{{ SHOPWARE_OPENSEARCH_MEM_RESERVATION }} -Xmx{{ SHOPWARE_OPENSEARCH_MEM_RESERVATION }}
|
||||
ulimits:
|
||||
memlock: { soft: -1, hard: -1 }
|
||||
depends_on:
|
||||
init:
|
||||
condition: service_completed_successfully
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
{% endif %}
|
||||
|
||||
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||
data:
|
||||
name: {{ SHOPWARE_VOLUME }}
|
||||
files:
|
||||
name: {{ entity_name }}_files
|
||||
theme:
|
||||
name: {{ entity_name }}_theme
|
||||
media:
|
||||
name: {{ entity_name }}_media
|
||||
thumbnail:
|
||||
name: {{ entity_name }}_thumbnail
|
||||
sitemap:
|
||||
name: {{ entity_name }}_sitemap
|
||||
bundles:
|
||||
name: {{ entity_name }}_bundles
|
||||
|
||||
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||
33
roles/web-app-shopware/templates/env.j2
Normal file
33
roles/web-app-shopware/templates/env.j2
Normal file
@@ -0,0 +1,33 @@
|
||||
# DOMAIN/URL
|
||||
DOMAIN={{ domains | get_domain(application_id) }}
|
||||
APP_URL="{{ domains | get_url(application_id, WEB_PROTOCOL) }}"
|
||||
APP_DEBUG="{{ MODE_DEBUG | ternary(1, 0) }}"
|
||||
|
||||
# Shopware
|
||||
APP_ENV={{ 'dev' if (ENVIRONMENT | lower) == 'development' else 'prod' }}
|
||||
#TRUSTED_PROXIES=127.0.0.1
|
||||
INSTANCE_ID={{ application_id }}
|
||||
|
||||
# Database
|
||||
DATABASE_URL="mysql://{{ database_username }}:{{ database_password }}@{{ database_host }}:{{ database_port }}/{{ database_name }}"
|
||||
|
||||
# Redis (optional)
|
||||
{% if SHOPWARE_REDIS_ENABLED | bool %}
|
||||
REDIS_URL="redis://{{ SHOPWARE_REDIS_ADDRESS }}/0"
|
||||
CACHE_URL="redis://{{ SHOPWARE_REDIS_ADDRESS }}/1"
|
||||
MESSENGER_TRANSPORT_DSN="redis://{{ SHOPWARE_REDIS_ADDRESS }}/2"
|
||||
{% else %}
|
||||
CACHE_URL="file://cache"
|
||||
{% endif %}
|
||||
|
||||
{% if SHOPWARE_OPENSEARCH_ENABLED %}
|
||||
# Search
|
||||
ELASTICSEARCH_URL="http://opensearch:9200"
|
||||
OPENSEARCH_URL="http://opensearch:9200"
|
||||
OPENSEARCH_HOST="opensearch"
|
||||
OPENSEARCH_PORT_NUMBER="9200"
|
||||
OPENSEARCH_INITIAL_ADMIN_PASSWORD="{{ users.administrator.password }}"
|
||||
{% endif %}
|
||||
|
||||
# Mail (Mailu)
|
||||
MAILER_DSN="smtps://{{ users['no-reply'].email }}:{{ users['no-reply'].mailu_token }}@{{ SYSTEM_EMAIL.HOST }}:{{ SYSTEM_EMAIL.PORT }}"
|
||||
38
roles/web-app-shopware/vars/main.yml
Normal file
38
roles/web-app-shopware/vars/main.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
# General
|
||||
application_id: "web-app-shopware"
|
||||
database_type: "mariadb"
|
||||
entity_name: "{{ application_id | get_entity_name }}"
|
||||
|
||||
# Docker
|
||||
container_port: "{{ applications | get_app_conf(application_id, 'docker.services.web.port') }}"
|
||||
docker_compose_flush_handlers: true
|
||||
|
||||
# Shopware container/image vars
|
||||
SHOPWARE_VERSION: "{{ applications | get_app_conf(application_id, 'docker.services.shopware.version') }}"
|
||||
SHOPWARE_IMAGE: "{{ applications | get_app_conf(application_id, 'docker.services.shopware.image') }}"
|
||||
SHOPWARE_CUSTOM_IMAGE: "{{ SHOPWARE_IMAGE }}:{{ SHOPWARE_VERSION }}"
|
||||
SHOPWARE_VOLUME: "{{ applications | get_app_conf(application_id, 'docker.volumes.data') }}"
|
||||
SHOPWARE_USER: "www-data"
|
||||
SHOPWARE_ROOT: "/var/www/html"
|
||||
|
||||
# Split service container names
|
||||
SHOPWARE_INIT_CONTAINER: "{{ applications | get_app_conf(application_id, 'docker.services.init.name') }}"
|
||||
SHOPWARE_WEB_CONTAINER: "{{ applications | get_app_conf(application_id, 'docker.services.web.name') }}"
|
||||
SHOPWARE_WORKER_CONTAINER: "{{ applications | get_app_conf(application_id, 'docker.services.worker.name') }}"
|
||||
SHOPWARE_SCHED_CONTAINER: "{{ applications | get_app_conf(application_id, 'docker.services.scheduler.name') }}"
|
||||
SHOPWARE_INIT_HOST: "{{ [ docker_compose.directories.volumes, 'init.sh' ] | path_join }}"
|
||||
SHOPWARE_INIT_DOCKER: "/usr/local/bin/init.sh"
|
||||
|
||||
# Entrypoints & replicas
|
||||
SHOPWARE_WORKER_ENTRYPOINT: "{{ applications | get_app_conf(application_id, 'docker.services.worker.entrypoint') }}"
|
||||
SHOPWARE_SCHED_ENTRYPOINT: "{{ applications | get_app_conf(application_id, 'docker.services.scheduler.entrypoint') }}"
|
||||
SHOPWARE_WORKER_REPLICAS: "{{ applications | get_app_conf(application_id, 'docker.services.worker.replicas') }}"
|
||||
|
||||
# Search/Cache
|
||||
SHOPWARE_REDIS_ENABLED: "{{ applications | get_app_conf(application_id, 'docker.services.redis.enabled') }}"
|
||||
SHOPWARE_REDIS_ADDRESS: "redis:6379"
|
||||
SHOPWARE_OPENSEARCH_ENABLED: "{{ applications | get_app_conf(application_id, 'docker.services.opensearch.enabled') }}"
|
||||
SHOPWARE_OPENSEARCH_IMAGE: "{{ applications | get_app_conf(application_id, 'docker.services.opensearch.image') }}"
|
||||
SHOPWARE_OPENSEARCH_VERSION: "{{ applications | get_app_conf(application_id, 'docker.services.opensearch.version') }}"
|
||||
SHOPWARE_OPENSEARCH_CONTAINER: "{{ applications | get_app_conf(application_id, 'docker.services.opensearch.name') }}"
|
||||
SHOPWARE_OPENSEARCH_MEM_RESERVATION: "{{ applications | get_app_conf(application_id, 'docker.services.opensearch.mem_reservation') }}"
|
||||
@@ -13,12 +13,12 @@ server:
|
||||
aliases: []
|
||||
csp:
|
||||
flags:
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-inline: true
|
||||
unsafe-eval: true
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
whitelist:
|
||||
font-src:
|
||||
|
||||
@@ -6,12 +6,12 @@ features:
|
||||
server:
|
||||
csp:
|
||||
flags:
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-eval: true
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
unsafe-eval: true
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
domains:
|
||||
canonical:
|
||||
|
||||
@@ -69,9 +69,9 @@ server:
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
unsafe-eval: true
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-eval: true
|
||||
domains:
|
||||
canonical:
|
||||
|
||||
@@ -88,16 +88,15 @@
|
||||
taiga:
|
||||
|
||||
{% set service_name = TAIGA_FRONT_SERVICE %}
|
||||
{% set container_port = 80 %}
|
||||
{{ service_name }}:
|
||||
container_name: {{ TAIGA_CONTAINER }}-{{ service_name }}
|
||||
image: "{{TAIGA_DOCKER_IMAGE_FRONTEND}}:{{ TAIGA_VERSION }}"
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1/ >/dev/null || curl -fsS http://127.0.0.1/ >/dev/null"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
{% filter indent(4) %}
|
||||
{% include 'roles/docker-container/templates/healthcheck/http.yml.j2' %}
|
||||
{% endfilter %}
|
||||
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
taiga:
|
||||
# volumes:
|
||||
@@ -152,22 +151,21 @@
|
||||
taiga:
|
||||
|
||||
{% set service_name = 'gateway' %}
|
||||
{% set container_port = 80 %}
|
||||
{{ service_name }}:
|
||||
container_name: {{ TAIGA_CONTAINER }}-{{ service_name }}
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:80"
|
||||
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}"
|
||||
volumes:
|
||||
- {{ docker_repository_path }}taiga-gateway/taiga.conf:/etc/nginx/conf.d/default.conf
|
||||
- static-data:/taiga/static
|
||||
- media-data:/taiga/media
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1/ >/dev/null || curl -fsS http://127.0.0.1/ >/dev/null"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
{% filter indent(4) %}
|
||||
{% include 'roles/docker-container/templates/healthcheck/http.yml.j2' %}
|
||||
{% endfilter %}
|
||||
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
taiga:
|
||||
depends_on:
|
||||
|
||||
@@ -17,11 +17,11 @@ features:
|
||||
server:
|
||||
csp:
|
||||
flags:
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-eval: true
|
||||
whitelist:
|
||||
worker-src:
|
||||
|
||||
@@ -32,7 +32,7 @@ server:
|
||||
worker-src:
|
||||
- "blob:"
|
||||
flags:
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-eval: true
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
|
||||
@@ -9,9 +9,11 @@
|
||||
environment:
|
||||
JAVA_OPTS: >-
|
||||
{% if xwiki_oidc_enabled_switch| bool %}
|
||||
-Dxwiki.authentication.authservice=oidc
|
||||
-Dxwiki.authentication.authclass=org.xwiki.contrib.oidc.auth.OIDCAuthServiceImpl
|
||||
{% elif xwiki_ldap_enabled_switch | bool %}
|
||||
-Dxwiki.authentication.authclass=org.xwiki.contrib.ldap.XWikiLDAPAuthServiceImpl
|
||||
-Dxwiki.authentication.authservice=ldap
|
||||
-Dxwiki.authentication.ldap=1
|
||||
-Dxwiki.authentication.ldap.trylocal={{ (XWIKI_LDAP_TRYLOCAL | bool) | ternary(1, 0) }}
|
||||
-Dxwiki.authentication.ldap.group_mapping=XWiki.XWikiAdminGroup={{ XWIKI_LDAP_ADMIN_GROUP_DN }}
|
||||
@@ -24,6 +26,7 @@
|
||||
-Dxwiki.authentication.ldap.fields_mapping={{ XWIKI_LDAP_FIELDS_MAPPING }}
|
||||
-Dxwiki.authentication.ldap.update_user=1
|
||||
{% else %}
|
||||
-Dxwiki.authentication.authservice=standard
|
||||
-Dxwiki.authentication.authclass=com.xpn.xwiki.user.impl.xwiki.XWikiAuthServiceImpl
|
||||
{% endif %}
|
||||
volumes:
|
||||
|
||||
@@ -20,11 +20,11 @@ server:
|
||||
aliases: []
|
||||
csp:
|
||||
flags:
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
script-src:
|
||||
script-src-attr:
|
||||
unsafe-inline: true
|
||||
locations:
|
||||
admin: "/admin/"
|
||||
|
||||
@@ -8,7 +8,7 @@ server:
|
||||
frame-ancestors:
|
||||
- "{{ WEB_PROTOCOL }}://*.{{ PRIMARY_DOMAIN }}"
|
||||
flags:
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
docker:
|
||||
services:
|
||||
|
||||
@@ -32,4 +32,6 @@
|
||||
and
|
||||
('already present' not in (collabora_preview.stdout | default('')))
|
||||
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
|
||||
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
|
||||
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
|
||||
|
||||
- include_tasks: utils/run_once.yml
|
||||
@@ -1,5 +1,3 @@
|
||||
- block:
|
||||
- name: "Load core functions for '{{ application_id }}'"
|
||||
include_tasks: 01_core.yml
|
||||
- include_tasks: utils/run_once.yml
|
||||
- name: "Load core functions for '{{ application_id }}'"
|
||||
include_tasks: 01_core.yml
|
||||
when: run_once_web_svc_collabora is not defined
|
||||
@@ -11,7 +11,7 @@ server:
|
||||
aliases: []
|
||||
csp:
|
||||
flags:
|
||||
style-src:
|
||||
style-src-attr:
|
||||
unsafe-inline: true
|
||||
script-src-elem:
|
||||
unsafe-inline: true
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user