This commit is contained in:
Nathan Price 2024-12-03 18:39:25 -05:00
parent 382ccf9e35
commit ea21cf2892
Signed by: gravityfargo
SSH key fingerprint: SHA256:bjq+uA1U+9bFMd70q2wdNtwaYxGv84IBXalnYvZDKmg

View file

@ -2,7 +2,7 @@
It is required to run the instance behind a proxy (like traefik) to generate SSL certificates. This will not work otherwise. The standard pds install includes caddy to handle this.
I can confirm it works behind Cloudflare's DNS proxy with Full (strict)
I can confirm it works behind Cloudflare's DNS Proxy with Full (strict)
## Deployment
@ -20,18 +20,21 @@ docker-compose up -d
docker exec -it bluesky-pds bash
pdsadmin account create
pdsadmin account list
# pdsadmin request-crawl bsky.network
pdsadmin request-crawl bsky.network # useful if you re-deploy the same instance multiple times
```
In your browser:
- Go to https://bsky-debug.app/handle and enter your new user, "HTTP Verification Method" needs to pass.
- [websocket-tester](https://piehost.com/websocket-tester) "wss://sheltersky.social/xrpc/com.atproto.sync.subscribeRepos?cursor=0" needs to display "Connection Established"
- [websocket-tester](https://piehost.com/websocket-tester) "wss://example.com/xrpc/com.atproto.sync.subscribeRepos?cursor=0" needs to display "Connection Established"
- https://boat.kelinci.net/ has a helpful tool to export your data.
- Log in with your new user and go to https://bsky.network/ to see your data.
- Log in with your new user and go to https://bsky.app/
### Example Docker Compose
Full list of additional Environment Variables can be found in the [packages/pds/src/config/env.ts](https://github.com/bluesky-social/atproto/blob/main/packages/pds/src/config/env.ts)
```yaml
services:
bluesky-pds:
@ -42,8 +45,10 @@ services:
PDS_ADMIN_PASSWORD: ...
PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX: ...
PDS_HOSTNAME: ...
PDS_EMAIL_SMTP_URL: ""
PDS_EMAIL_FROM_ADDRESS: ""
volumes:
- ./config:/pds
- ./bluesky-pds:/pds
```
### Example Docker Compose with Traefik
@ -60,14 +65,13 @@ services:
PDS_JWT_SECRET: ""
PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX: ""
PDS_HOSTNAME: example.com
PDS_EMAIL_SMTP_URL: smtps://smtp-relay.gmail.com:465/
PDS_EMAIL_FROM_ADDRESS: gravityfargo@gmail.com
PDS_EMAIL_SMTP_URL: ""
PDS_EMAIL_FROM_ADDRESS: ""
volumes:
- /bluesky-pds:/pds
- ./bluesky-pds:/pds
labels:
traefik.enable: "true"
traefik.http.**routers**.bluesky-pds-insecure.entrypoints: http
traefik.http.routers.bluesky-pds-insecure.entrypoints: http
traefik.http.routers.bluesky-pds-insecure.rule: HostRegexp(`^.+\.example\.com$`) || Host(`example.social`)
traefik.http.routers.bluesky-pds-secure.entrypoints: https
traefik.http.routers.bluesky-pds-secure.rule: HostRegexp(`^.+\.example\.com$`) || Host(`example.social`)
@ -77,8 +81,11 @@ services:
traefik.http.routers.bluesky-pds-secure.middlewares: BlueskyHeaders@file
traefik.http.routers.bluesky-pds-insecure.middlewares: BlueskyHeaders@file
```
#### Middleware
I think file configs are cleaner than having a billion labels.
```yaml
http:
middlewares:
@ -95,6 +102,7 @@ http:
addVaryHeader: true
stsSeconds: 63072000
```
## Development Notes
```bash