Parakeet PLC Mirror#
A little Rust mirror of Bluesky Social PBC's plc.directory for use with the Parakeet AppView project.
All endpoints bar /export and /{did}/data are implemented and should be functionally identical.
Running#
Prerequisites#
- Either Docker, or a binary from Compiling
- Postgres (tested with 16, but any recent version should work)
Running PLC Mirror#
A docker image is provided as registry.gitlab.com/parakeet-social/plc-mirror, or you can compile a binary.
Complete the below environment variables:
| Variable | Description | Default |
|---|---|---|
PLC_DB_URI |
(required) Postgres DB URI in format postgres://{user}:{pass}@{addr}/{db} |
|
PLC_UPSTREAM |
(optional) Upstream PLC directory to import from | https://plc.directory |
PLC_BIND_ADDR |
(optional) The address and port to bind to, in format {IP}:{port} |
127.0.0.1:8080 |
PLC_USER_AGENT |
(recommended) The User-Agent header to set on export requests from upstream. Setting this is highly advised | parakeet-plc |
PLC_START_AFTER |
(optional) Where in time to start importing from PLC. Leaving blank will trigger an import from the beginning of the directory or from the last seen TS if applicable. In format 2018-01-26T18:30:09.453Z. |
Then, run the binary. Imports from the upstream directory will begin immediately alongside the API server.
Compiling#
You'll need Rust, Cargo, and openssl-dev (aka libssl-dev) to build. Builds are tested on Rust 1.85.
A simple cargo b or cargo r should work just fine, likewise for release options.
License & Contributing#
This project is licensed under Apache-2. Contributions are welcome, but please discuss first.