Big restructuring

This commit is contained in:
2025-05-20 00:13:45 +02:00
parent efe994a4c5
commit f748f9cef1
44 changed files with 697 additions and 469 deletions

View File

@@ -1,4 +1,3 @@
---
- name: "include docker-compose role"
include_role:
name: docker-compose
@@ -10,8 +9,8 @@
domain: "{{ item.domain }}"
http_port: "{{ item.http_port }}"
loop:
- { domain: domains.[application_id].api, http_port: ports.localhost.http.bluesky_api }
- { domain: domains.[application_id].web, http_port: ports.localhost.http.bluesky_web }
- { domain: "{{domains.[application_id].api", http_port: "{{ports.localhost.http.bluesky_api}}" }
- { domain: "{{domains.[application_id].web}}", http_port: "{{ports.localhost.http.bluesky_web}}" }
# The following lines should be removed when the following issue is closed:
# https://github.com/bluesky-social/pds/issues/52

View File

@@ -5,4 +5,4 @@ social_app_path: "{{ docker_compose.directories.services }}/social-
# https://github.com/bluesky-social/pds/issues/52
pdsadmin_folder_path: "{{ docker_compose.directories.volumes }}/pdsadmin"
pdsadmin_file_path: "{{pdsadmin_folder_path}}/pdsadmin"
pdsadmin_temporary_tar_path: "/tmp/pdsadmin.tar.gz"
pdsadmin_temporary_tar_path: "/tmp/pdsadmin.tar.gz"

View File

@@ -1,5 +1,3 @@
{# receives https certificate and setup proxy with domain replace #}
- name: "include role receive certbot certificate"
include_role:
name: nginx-https-get-cert

View File

@@ -116,7 +116,7 @@ portfolio_menu_categories:
- accounting
- invoices
- akaunting
- snipe_it
- snipe-it
Events:
description: "Event and ticket management tools"

View File

@@ -5,12 +5,12 @@ services:
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
application:
image: grokability/snipe-it:{{applications.snipe_it.version}}
image: grokability/snipe-it:{{applications[application_id].version}}
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
volumes:
- data:/var/lib/snipeit
ports:
- "127.0.0.1:{{ports.localhost.http.snipe_it}}:80"
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
healthcheck:

View File

@@ -0,0 +1,3 @@
application_id: "snipe-it"
database_password: "{{applications[application_id].credentials.database_password}}"
database_type: "mariadb"

View File

@@ -1,3 +0,0 @@
application_id: "snipe_it"
database_password: "{{applications.snipe_it.credentials.database_password}}"
database_type: "mariadb"

View File

@@ -47,7 +47,7 @@ for filename in os.listdir(config_path):
# Prepare the URL and expected status codes
url = f"{{ web_protocol }}://{domain}"
redirected_domains = [domain['source'] for domain in {{redirect_domain_mappings}}]
redirected_domains = [domain['source'] for domain in {{current_play_redirect_domain_mappings}}]
{%- if domains.mailu | safe_var | bool %}
redirected_domains.append("{{domains | get_domain('mailu')}}")
{%- endif %}

View File

@@ -4,4 +4,5 @@ caa_entries:
# - tag: issuewild
# value: "letsencrypt.org"
# - tag: iodef
# value: "mailto:{{ users.administrator.email }}"
# value: "mailto:{{ users.administrator.email }}"
base_sld_domains: "{{ current_play_domains_all | generate_base_sld_domains }}"

View File

@@ -8,7 +8,7 @@
- name: Generate SAN certificate with certbundle
command: >-
certbundle
--domains "{{ all_domains | join(',') }}"
--domains "{{ current_play_domains_all | join(',') }}"
--certbot-email "{{ users.administrator.email }}"
--certbot-acme-challenge-method "{{ certbot_acme_challenge_method }}"
--chunk-size 100

View File

@@ -1,2 +1,2 @@
base_domain: "{{ domain | regex_replace('^(?:.*\\.)?(.+\\..+)$', '\\1') }}"
verification_url: "{{ web_protocol }}://{{domains | get_domain('mastodon')}}/index.php?module=API&method=SitesManager.getSitesIdFromSiteUrl&url=https://{{base_domain}}&format=json&token_auth={{applications.matomo.credentials.auth_token}}"
verification_url: "{{ web_protocol }}://{{domains | get_domain('matomo')}}/index.php?module=API&method=SitesManager.getSitesIdFromSiteUrl&url=https://{{base_domain}}&format=json&token_auth={{applications.matomo.credentials.auth_token}}"

View File

@@ -1,7 +1,7 @@
---
- name: Filter www-prefixed domains from all_domains
- name: Filter www-prefixed domains from current_play_domains_all
set_fact:
www_domains: "{{ all_domains | select('match', '^www\\.') | list }}"
www_domains: "{{ current_play_domains_all | select('match', '^www\\.') | list }}"
- name: Include nginx-redirect-domains role for www-to-bare redirects
include_role:

View File

@@ -1,4 +1,3 @@
source_directory: "{{ playbook_dir }}/assets" # Directory from which the assets will be copied
url: >-
{{ (web_protocol ~ '://' ~ domains.file_server | safe_var ~ '/assets')
if domains.file_server | safe_var else '' }}
source_directory: "{{ playbook_dir }}/assets"
url: "{{ web_protocol ~ '://' ~ 'file-server'
| load_configuration('domains.canonical[0]') ~ '/assets' }}"

View File

@@ -1,3 +1,3 @@
application_id: "assets_server" # Application identifier
application_id: "assets-server" # Application identifier
source_directory: "{{ applications[application_id].source_directory }}/" # Source directory from which the files are coming from
target_directory: "{{ nginx.directories.data.files }}assets" # Directory to which the files will be copied

View File

@@ -31,5 +31,5 @@ The Nginx File Server role is ideal for hosting static files, sharing resources
- [Nginx Official Website](https://nginx.org/)
- [Let's Encrypt](https://letsencrypt.org/)
- [HTTP File Server (Wikipedia)](https://en.wikipedia.org/wiki/HTTP_File_Server)
- [HTTP File Server (Wikipedia)](https://en.wikipedia.org/wiki/HTTP_file-server)
- [HTTPS (Wikipedia)](https://en.wikipedia.org/wiki/HTTPS)

View File

@@ -1,2 +1,2 @@
application_id: "file_server"
domain: "{{ domains | get_domain(application_id) }}"
application_id: "file-server"
domain: "{{ domains | get_domain(application_id) }}"