mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Refactored bluesky
This commit is contained in:
@@ -4,16 +4,16 @@
|
||||
## Setup
|
||||
### Set variables
|
||||
|
||||
#### bluesky_pds_jwt_secret
|
||||
#### applications.bluesky.pds.jwt_secret
|
||||
```bash
|
||||
openssl rand -base64 64 | tr -d '\n'
|
||||
```
|
||||
for
|
||||
|
||||
#### bluesky_pds_plc_rotation_key_k256_private_key_hex
|
||||
#### applications.bluesky.pds.plc_rotation_key_k256_private_key_hex
|
||||
openssl rand -hex 32
|
||||
|
||||
#### bluesky_pds_admin_password
|
||||
#### applications.bluesky.pds.admin_password
|
||||
openssl rand -base64 16
|
||||
|
||||
### Configure DNS
|
||||
@@ -58,4 +58,4 @@ Initial setup keine top level domain
|
||||
- https://github.com/bluesky-social/pds/issues/52
|
||||
- https://github.com/lhaig/pdsadmin
|
||||
- https://github.com/bluesky-social/pds/issues/147
|
||||
-
|
||||
- https://docs.bsky.app/docs/advanced-guides/oauth-client
|
||||
|
@@ -50,8 +50,5 @@
|
||||
version: "main"
|
||||
notify: docker compose project build and setup
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template:
|
||||
src: docker-compose.yml.j2
|
||||
dest: "{{docker_compose.directories.instance}}docker-compose.yml"
|
||||
notify: docker compose project build and setup
|
||||
- name: "copy docker-compose.yml and env file"
|
||||
include_tasks: copy-docker-compose-and-env.yml
|
||||
|
@@ -1,33 +1,10 @@
|
||||
services:
|
||||
pds:
|
||||
image: "ghcr.io/bluesky-social/pds:{{applications.bluesky.pds.version}}"
|
||||
restart: {{docker_restart_policy}}
|
||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
||||
volumes:
|
||||
- pds_data:/pds
|
||||
- {{pdsadmin_file_path}}:/usr/local/bin/pdsadmin:ro
|
||||
environment:
|
||||
# Geben Sie hier Ihre Domain und Konfigurationsdetails an
|
||||
PDS_HOSTNAME: "{{domains.api}}"
|
||||
PDS_ADMIN_EMAIL: "{{applications.bluesky.administrator_email}}"
|
||||
PDS_SERVICE_DID: "did:web:{{domain_api}}"
|
||||
# See https://mattdyson.org/blog/2024/11/self-hosting-bluesky-pds/
|
||||
PDS_SERVICE_HANDLE_DOMAINS: ".{{primary_domain}}"
|
||||
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.password}}@{{system_email.host}}:{{system_email.port}}/
|
||||
PDS_EMAIL_FROM_ADDRESS: {{system_email.from}}
|
||||
LOG_ENABLED: true
|
||||
PDS_BLOBSTORE_DISK_LOCATION: /opt/pds/blocks
|
||||
# -- DEFAULT VALUES ---
|
||||
# PDS_DATA_DIRECTORY: /opt/pds
|
||||
# PDS_BLOB_UPLOAD_LIMIT: 52428800
|
||||
# PDS_DID_PLC_URL=https://plc.directory
|
||||
# PDS_BSKY_APP_VIEW_URL=https://api.bsky.app
|
||||
# PDS_BSKY_APP_VIEW_DID=did:web:api.bsky.app
|
||||
# PDS_REPORT_SERVICE_URL=https://mod.bsky.app
|
||||
# PDS_REPORT_SERVICE_DID=did:plc:ar7c4by46qjdydhdevvrndac
|
||||
ports:
|
||||
- "127.0.0.1:{{http_port_api}}:3000"
|
||||
healthcheck:
|
||||
@@ -49,17 +26,14 @@ services:
|
||||
REACT_APP_API_URL: "http://{{domain_api}}" # API-URL des PDS
|
||||
REACT_APP_SITE_NAME: "{{primary_domain | upper}} - Bluesky"
|
||||
REACT_APP_SITE_DESCRIPTION: "Decentral Social "
|
||||
restart: {{docker_restart_policy}}
|
||||
ports:
|
||||
- "127.0.0.1:{{http_port_web}}:8100"
|
||||
# Start already parallel to pds
|
||||
#depends_on:
|
||||
# - None
|
||||
healthcheck:
|
||||
test: ["CMD", "sh", "-c", "for pid in $(ls /proc | grep -E '^[0-9]+$'); do if cat /proc/$pid/cmdline 2>/dev/null | grep -q 'bskywebserve'; then exit 0; fi; done; exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
||||
|
||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
||||
pds_data:
|
||||
|
22
roles/docker-bluesky/templates/env.j2
Normal file
22
roles/docker-bluesky/templates/env.j2
Normal file
@@ -0,0 +1,22 @@
|
||||
PDS_HOSTNAME="{{domains.bluesky_api}}"
|
||||
PDS_ADMIN_EMAIL="{{applications.bluesky.administrator_email}}"
|
||||
PDS_SERVICE_DID="did:web:{{domains.bluesky_api}}"
|
||||
|
||||
# See https://mattdyson.org/blog/2024/11/self-hosting-bluesky-pds/
|
||||
PDS_SERVICE_HANDLE_DOMAINS=".{{primary_domain}}"
|
||||
PDS_JWT_SECRET="{{applications.bluesky.pds.jwt_secret}}"
|
||||
PDS_ADMIN_PASSWORD="{{applications.bluesky.pds.admin_password}}"
|
||||
PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX="{{applications.bluesky.pds.plc_rotation_key_k256_private_key_hex}}"
|
||||
PDS_CRAWLERS=https://bsky.network
|
||||
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
|
||||
PDS_BLOBSTORE_DISK_LOCATION=/opt/pds/blocks
|
||||
# -- DEFAULT VALUES ---
|
||||
# PDS_DATA_DIRECTORY: /opt/pds
|
||||
# PDS_BLOB_UPLOAD_LIMIT: 52428800
|
||||
# PDS_DID_PLC_URL=https://plc.directory
|
||||
# PDS_BSKY_APP_VIEW_URL=https://api.bsky.app
|
||||
# PDS_BSKY_APP_VIEW_DID=did:web:api.bsky.app
|
||||
# PDS_REPORT_SERVICE_URL=https://mod.bsky.app
|
||||
# PDS_REPORT_SERVICE_DID=did:plc:ar7c4by46qjdydhdevvrndac
|
@@ -1,8 +1,8 @@
|
||||
application_id: "bluesky"
|
||||
social_app_path: "{{ docker_compose.directories.instance }}/social-app"
|
||||
social_app_path: "{{ docker_compose.directories.services }}/social-app"
|
||||
|
||||
# This should be removed when the following issue is closed:
|
||||
# https://github.com/bluesky-social/pds/issues/52
|
||||
pdsadmin_folder_path: "{{ docker_compose.directories.instance }}/pdsadmin"
|
||||
pdsadmin_folder_path: "{{ docker_compose.directories.volumes }}/pdsadmin"
|
||||
pdsadmin_file_path: "{{pdsadmin_folder_path}}/pdsadmin"
|
||||
pdsadmin_temporary_tar_path: "/tmp/pdsadmin.tar.gz"
|
Reference in New Issue
Block a user