From dda032ff446879268a8806917b64f30bb8d3d246 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 17 Jan 2025 13:40:31 +0100 Subject: [PATCH] Updated bluesky variables and implemented playbook --- group_vars/all | 6 ++--- playbook.servers.yml | 9 ++++++++ roles/docker-bluesky/README.md | 23 +++++++++++++++---- .../templates/docker-compose.yml.j2 | 14 +++++------ 4 files changed, 38 insertions(+), 14 deletions(-) diff --git a/group_vars/all b/group_vars/all index 803029ce..130f5586 100644 --- a/group_vars/all +++ b/group_vars/all @@ -129,8 +129,8 @@ nginx_configuration_directory: "/etc/nginx/conf.d/" nginx_servers_directory: "{{nginx_configuration_directory}}servers/" # Contains server blogs nginx_maps_directory: "{{nginx_configuration_directory}}maps/" # Contains mappins nginx_upstreams_directory: "{{nginx_configuration_directory}}upstreams/" # Contains upstream configurations -nginx_well_known_root: "/usr/share/nginx/well-known/" # Path where well-known files are stored -nginx_homepage_root: "/usr/share/nginx/homepage/" # Path where the static homepage files are stored +nginx_well_known_root: "/usr/share/nginx/well-known/" # Path where well-known files are stored +nginx_homepage_root: "/usr/share/nginx/homepage/" # Path where the static homepage files are stored ## Domains @@ -146,7 +146,7 @@ domain_friendica: "friendica.{{top_domain}}" domain_funkwhale: "music.{{top_domain}}" domain_gitea: "git.{{top_domain}}" domain_gitlab: "gitlab.{{top_domain}}" -domain_portfolio: "{{top_domain}}" +domain_portfolio: "{{top_domain}}" domain_listmonk: "newsletter.{{top_domain}}" domain_mailu: "{{system_email_host}}" domain_mastodon: "microblog.{{top_domain}}" diff --git a/playbook.servers.yml b/playbook.servers.yml index d48b7d6b..72a4ac48 100644 --- a/playbook.servers.yml +++ b/playbook.servers.yml @@ -286,6 +286,15 @@ domain: "{{domain_portfolio}}" http_port: 8029 +- name: setup bluesky + hosts: bluesky + become: true + roles: + - role: docker-bluesky + vars: + domain: "{{domain_bluesky}}" + http_port: 8030 + # Native Webserver Roles - name: setup nginx-static-repositorys hosts: nginx-static-repositorys diff --git a/roles/docker-bluesky/README.md b/roles/docker-bluesky/README.md index 7e7284db..cef7bdc7 100644 --- a/roles/docker-bluesky/README.md +++ b/roles/docker-bluesky/README.md @@ -1,9 +1,24 @@ # DRAFT role docker-bluesky -UPtIn/VqlSyN4a8jO7FtwUxFqcHP5yqCXEzcDCRxRrvf1DPDtuPz7RS8yZ4GQq8K -CT+h2/EdjnMrdIcaPa1XRw== -jtEVJfLEfonUNkFhBsThHXAFhBI2f2u5fwLxCaXuXYvTrRIMl3ju1TTEzrGNw4cYsxdUZ4+4HDx5dkpGzd3HGA== +## Set variables + +### bluesky_pds_jwt_secret +```bash +openssl rand -base64 64 | tr -d '\n' +``` +for + +### bluesky_pds_plc_rotation_key_k256_private_key_hex +openssl rand -hex 32 + +### bluesky_pds_admin_password +openssl rand -base64 16 + +### bluesky_database_password +openssl rand -base64 32 + ## more information - https://therobbiedavis.com/selfhosting-bluesky-with-docker-and-swag/ - https://cprimozic.net/notes/posts/notes-on-self-hosting-bluesky-pds-alongside-other-services/ -- https://github.com/bluesky-social/pds \ No newline at end of file +- https://github.com/bluesky-social/pds +- https://chatgpt.com/c/678a2eb6-145c-800f-bf51-ff706981a928 \ No newline at end of file diff --git a/roles/docker-bluesky/templates/docker-compose.yml.j2 b/roles/docker-bluesky/templates/docker-compose.yml.j2 index 41b1e36d..d5ef5f76 100644 --- a/roles/docker-bluesky/templates/docker-compose.yml.j2 +++ b/roles/docker-bluesky/templates/docker-compose.yml.j2 @@ -5,22 +5,22 @@ services: ports: - {{http_port}}:3000 volumes: - - data:/pds + - pds_data:/pds env_file: - /env environment: # Geben Sie hier Ihre Domain und Konfigurationsdetails an PDS_HOSTNAME: "{{domain}}" - PDS_ADMIN_EMAIL: "{{PDS_ADMIN_EMAIL}}" + PDS_ADMIN_EMAIL: "{{administrator_email}}" PDS_DB__POSTGRES__URL: "postgres://{{ database_username }}:{{ database_password }}@{{ database_host }}:5432/{{ database_name }}" PDS_SERVICE_DID: "did:web:{{ domain }}" # See https://mattdyson.org/blog/2024/11/self-hosting-bluesky-pds/ PDS_SERVICE_HANDLE_DOMAINS: ."{{domain}}" - PDS_JWT_SECRET: - PDS_ADMIN_PASSWORD: - PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX: + PDS_JWT_SECRET: "{{bluesky_pds_jwt_secret}}" + PDS_ADMIN_PASSWORD: "{{bluesky_pds_admin_password}}" + PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX: "{{bluesky_pds_plc_rotation_key_k256_private_key_hex}}" PDS_CRAWLERS: https://bsky.network - PDS_EMAIL_SMTP_URL: smtps://{{system_email_username}}:{{system_email_passwort}}@{{system_email_host}}:{{system_email_port}}/ + PDS_EMAIL_SMTP_URL: smtps://{{system_email_username}}:{{system_email_password}}@{{system_email_host}}:{{system_email_port}}/ PDS_EMAIL_FROM_ADDRESS: {{system_email_from}} LOG_ENABLED: true @@ -61,6 +61,6 @@ services: {% include 'templates/docker/services/' + database_type + '.yml.j2' %} {% include 'templates/docker/compose/volumes.yml.j2' %} - data: + pds_data: {% include 'templates/docker/compose/networks.yml.j2' %} \ No newline at end of file