Skip to content

Commit ef2ab39

Browse files
committed
chore: readme, license and cleanup
1 parent fa318b5 commit ef2ab39

File tree

8 files changed

+128
-2
lines changed

8 files changed

+128
-2
lines changed

.github/workflows/build-and-push-ghcr.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# Copyright (C) 2024 Robin Lamberti.
2+
3+
# This file is part of pdsadmin-docker.
4+
5+
# pdsadmin-docker is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU General Public License as published by
7+
# the Free Software Foundation, either version 3 of the License, or
8+
# (at your option) any later version.
9+
10+
# pdsadmin-docker is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU General Public License for more details.
14+
15+
# You should have received a copy of the GNU General Public License
16+
# along with pdsadmin-docker. If not, see <http://www.gnu.org/licenses/>.
117
name: build-and-push-ghcr
218
on:
319
push:

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# Copyright (C) 2024 Robin Lamberti.
2+
3+
# This file is part of pdsadmin-docker.
4+
5+
# pdsadmin-docker is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU General Public License as published by
7+
# the Free Software Foundation, either version 3 of the License, or
8+
# (at your option) any later version.
9+
10+
# pdsadmin-docker is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU General Public License for more details.
14+
15+
# You should have received a copy of the GNU General Public License
16+
# along with pdsadmin-docker. If not, see <http://www.gnu.org/licenses/>.
17+
118
FROM debian:stable-slim
219

320
LABEL org.opencontainers.image.source=https://github.com/cr0ssing/pdsadmin-docker

README.MD

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# PDS Admin for Docker
2+
![Github Actions Status](https://github.com/cr0ssing/pdsadmin-docker/actions/workflows/build-and-push-ghcr.yaml/badge.svg) ![GitHub License](https://img.shields.io/github/license/cr0ssing/pdsadmin-docker) ![GitHub Release](https://img.shields.io/github/v/release/cr0ssing/pdsadmin-docker)
3+
4+
5+
This repository provides a way to use the [Bluesky Personal Data Server](https://github.com/bluesky-social/pds) admin CLI fully dockerized. This makes it possible to use named volumes to store the application data used by pds and pdsadmin and isntall both by using a single docker compose file. This also makes it easier to sync the environment variables between both components.
6+
7+
## Usage
8+
1. configure your `.env` file. You can copy the `example.env` file and fill in the \<placeholders>. Generate secret 1 and 2 with `openssl rand --hex 16` and secret 3 with `openssl ecparam --name secp256k1 --genkey --noout --outform DER | tail --bytes=+8 | head --bytes=32 | xxd --plain --cols 32` (from the PDS repo's install script)
9+
2. (optional) if you're using a reverse proxy e.g. traefik adjust the labels of the `pds` service in the docker compose file.
10+
3. use `docker compose up` to start the PDS and the PDS Admin CLI
11+
4. you can now access the cli with `./pdsadmin.sh`. If you want you can put this script on your PATH to access it more seamlessly.
12+
13+
## License
14+
This project is licensed under GPL 3.0.

add_license_header.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
# Copyright (C) 2024 Robin Lamberti.
4+
5+
# This file is part of pdsadmin-docker.
6+
7+
# pdsadmin-docker is free software: you can redistribute it and/or modify
8+
# it under the terms of the GNU General Public License as published by
9+
# the Free Software Foundation, either version 3 of the License, or
10+
# (at your option) any later version.
11+
12+
# pdsadmin-docker is distributed in the hope that it will be useful,
13+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
# GNU General Public License for more details.
16+
17+
# You should have received a copy of the GNU General Public License
18+
# along with pdsadmin-docker. If not, see <http://www.gnu.org/licenses/>.
19+
20+
for i in $(find ./ -name '*.yaml') # or whatever other pattern...
21+
do
22+
if ! grep -q Copyright $i
23+
then
24+
cat copyright_header.txt $i >$i.new && mv $i.new $i
25+
fi
26+
done

copyright_header.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright (C) 2024 Robin Lamberti.
2+
3+
# This file is part of pdsadmin-docker.
4+
5+
# pdsadmin-docker is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU General Public License as published by
7+
# the Free Software Foundation, either version 3 of the License, or
8+
# (at your option) any later version.
9+
10+
# pdsadmin-docker is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU General Public License for more details.
14+
15+
# You should have received a copy of the GNU General Public License
16+
# along with pdsadmin-docker. If not, see <http://www.gnu.org/licenses/>.

docker-compose.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# Copyright (C) 2024 Robin Lamberti.
2+
3+
# This file is part of pdsadmin-docker.
4+
5+
# pdsadmin-docker is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU General Public License as published by
7+
# the Free Software Foundation, either version 3 of the License, or
8+
# (at your option) any later version.
9+
10+
# pdsadmin-docker is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU General Public License for more details.
14+
15+
# You should have received a copy of the GNU General Public License
16+
# along with pdsadmin-docker. If not, see <http://www.gnu.org/licenses/>.
17+
118
version: '3.9'
219

320
services:

example.env

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PDS_HOSTNAME=<your-domain.com>
2-
PDS_JWT_SECRET=<secret>
2+
PDS_JWT_SECRET=<secret 1>
33
PDS_ADMIN_PASSWORD=<secret 2>
44
PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX=<secret 3>
55

@@ -13,4 +13,7 @@ PDS_REPORT_SERVICE_DID=did:plc:ar7c4by46qjdydhdevvrndac
1313
PDS_CRAWLERS=https://bsky.network
1414
LOG_ENABLED=true
1515
NODE_ENV=production
16-
PDS_PORT=3000
16+
PDS_PORT=3000
17+
PDS_EMAIL_SMTP_URL=<email_user>:Y<email_password><smpt_server>
18+
PDS_EMAIL_FROM_ADDRESS=<email>
19+
PDS_SERVICE_HANDLE_DOMAINS=<.your-domain.com>,<.also.your-domain.com>

pdsadmin.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
11
#! /bin/sh
22

3+
# Copyright (C) 2024 Robin Lamberti.
4+
5+
# This file is part of pdsadmin-docker.
6+
7+
# pdsadmin-docker is free software: you can redistribute it and/or modify
8+
# it under the terms of the GNU General Public License as published by
9+
# the Free Software Foundation, either version 3 of the License, or
10+
# (at your option) any later version.
11+
12+
# pdsadmin-docker is distributed in the hope that it will be useful,
13+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
# GNU General Public License for more details.
16+
17+
# You should have received a copy of the GNU General Public License
18+
# along with pdsadmin-docker. If not, see <http://www.gnu.org/licenses/>.
19+
320
docker exec -it pdsadmin ./pdsadmin.sh $@

0 commit comments

Comments
 (0)