+12
.env.example
+12
.env.example
+60
README.md
+60
README.md
···
1
+
# Dockerized AT Protocol Relay
2
+
3
+
Heavily ~~copy and pasted~~ influenced by [phil's relay configurations](https://gist.github.com/futurGH/2ee18d385eff3ba98f5b35b9dcac0aed#file-docker-compose-yaml-L1) and [futur.blue's whitewind blog post](https://whtwnd.com/futur.blue/3lkubavdilf2m)
4
+
5
+
## Setup
6
+
7
+
clone this repo and change directory into it
8
+
9
+
```bash
10
+
git clone git@tangled.sh:dane.is.extraordinarily.cool/relay-docker
11
+
12
+
cd relay-docker
13
+
```
14
+
15
+
clone the indigo repo
16
+
17
+
```bash
18
+
git clone git@github.com:bluesky-social/indigo.git
19
+
```
20
+
21
+
rename the `.env.example` file to just `.env`
22
+
23
+
```bash
24
+
mv .env.example .env
25
+
```
26
+
27
+
add values for these env variables, see [configuration and operation](https://github.com/bluesky-social/indigo/blob/main/cmd/relay/README.md#configuration-and-operation) section in the indigo repo to understand what the values mean
28
+
29
+
```bash
30
+
RELAY_LENIENT_SYNC_VALIDATION=true
31
+
RELAY_REPLAY_WINDOW=24h
32
+
RELAY_PERSIST_DIR=/data/relay/persist
33
+
RELAY_ADMIN_PASSWORD=
34
+
RELAY_TRUSTED_DOMAINS=
35
+
RELAY_HOST_CONCURRENCY=4
36
+
37
+
# database env
38
+
DATABASE_URL=
39
+
POSTGRES_USER=
40
+
POSTGRES_PASSWORD=
41
+
POSTGRES_DB=
42
+
```
43
+
44
+
start relay
45
+
46
+
```bash
47
+
docker compose up -d
48
+
```
49
+
50
+
verify that it is running
51
+
52
+
```bash
53
+
curl localhost:2470
54
+
```
55
+
56
+
## PDS Crawling
57
+
58
+
see [bootstrapping host list](https://github.com/bluesky-social/indigo/blob/main/cmd/relay/README.md#bootstrapping-host-list) and the [how to do it](https://whtwnd.com/futur.blue/3lkubavdilf2m) section in futur's blog post to see how to bootstrap your relay with pdses
59
+
60
+
note: im still figuring this out so i may be missing a lot of stuff
+34
docker-compose.yml
+34
docker-compose.yml
···
1
+
volumes:
2
+
relay:
3
+
name: relay
4
+
5
+
services:
6
+
server:
7
+
env_file: .env
8
+
ports:
9
+
- 2470:2470
10
+
build:
11
+
context: ./indigo
12
+
dockerfile: cmd/relay/Dockerfile
13
+
restart: on-failure
14
+
depends_on:
15
+
db:
16
+
condition: service_healthy
17
+
restart: true
18
+
volumes:
19
+
- relay:/data/relay/persist
20
+
db:
21
+
env_file: .env
22
+
image: postgres:latest
23
+
healthcheck:
24
+
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
25
+
interval: 10s
26
+
retries: 5
27
+
start_period: 30s
28
+
timeout: 10s
29
+
restart: always
30
+
volumes:
31
+
- ${HOME}/postgres-data:/var/lib/postgresql/data
32
+
- ./init.sql:/docker-entrypoint-initdb.d/init.sql:ro
33
+
ports:
34
+
- "5432:5432"