Added Raw Draft for Bluesky

This commit is contained in:
Kevin Veen-Birkenbach 2025-01-09 09:00:09 +01:00
parent daceed8cd5
commit 702148cfd0
5 changed files with 87 additions and 0 deletions

View File

@ -0,0 +1,5 @@
# DRAFT role docker-bluesky
## 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/

View File

@ -0,0 +1,10 @@
---
- name: "include docker/compose/database.yml"
include_tasks: docker/compose/database.yml
- name: "include tasks nginx-docker-proxy-domain.yml"
include_tasks: nginx-docker-proxy-domain.yml
- name: add docker-compose.yml
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
notify: docker compose project setup

View File

@ -0,0 +1,52 @@
services:
pds:
container_name: pds
image: ghcr.io/bluesky-social/pds:0.4
restart: unless-stopped
ports:
- 3000:3000
volumes:
- path/to/pds/storage:/pds
env_file:
- /path/to/pds.env
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
application:
logging:
driver: journald
restart: {{docker_restart_policy}}
image: gitea/gitea:latest
environment:
- USER_UID=1000
- USER_GID=1000
- DB_TYPE=mysql
- DB_HOST={{database_host}}:3306
- DB_NAME={{database_name}}
- DB_USER={{database_username}}
- DB_PASSWD={{database_password}}
- SSH_PORT={{ssh_port}}
- SSH_LISTEN_PORT=22
- DOMAIN={{domain}}
- SSH_DOMAIN={{domain}}
- RUN_MODE="{{run_mode}}"
- ROOT_URL="https://{{domain}}/"
ports:
- "127.0.0.1:{{http_port}}:3000"
- "{{ssh_port}}:22"
volumes:
- data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:3000"]
interval: 1m
timeout: 10s
retries: 3
{% include 'templates/docker/container/networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
{% include 'templates/docker/compose/volumes.yml.j2' %}
data:
{% include 'templates/docker/compose/networks.yml.j2' %}

View File

@ -0,0 +1,17 @@
PDS_HOSTNAME= #bluesky.yourdomain.com
PDS_JWT_SECRET= #openssl rand --hex 16
PDS_ADMIN_PASSWORD= #openssl rand --hex 16
PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX= #openssl ecparam --name secp256k1 --genkey --noout --outform DER | tail --bytes=+8 | head --bytes=32 | xxd --plain --cols 32
PDS_EMAIL_SMTP_URL= #smtp://username@gmail.com:password@smtp.gmail.com:587
PDS_EMAIL_FROM_ADDRESS= #admin@domain.com
PDS_MODERATION_EMAIL_SMTP_URL= #smtp://username@gmail.com:password@smtp.gmail.com:587
PDS_MODERATION_EMAIL_ADDRESS= #admin@domain.com
PDS_DATA_DIRECTORY=/pds
PDS_BLOBSTORE_DISK_LOCATION=/pds/blocks
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
PDS_CRAWLERS=https://bsky.network
LOG_ENABLED=true

View File

@ -0,0 +1,3 @@
docker_compose_project_name: "bluesky"
database_password: "{{bluesky_database_password}}"
database_type: "mariadb"