From 42133b257bd6e78fdc8e790135c5f430e73160b7 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Mon, 6 May 2024 09:01:21 -1000 Subject: [PATCH] docs: :memo: Update README and Docker instructions --- README.MD | 32 +++++++++++++++++++++++--------- docker-compose.yml | 9 +++++++++ 2 files changed, 32 insertions(+), 9 deletions(-) create mode 100644 docker-compose.yml diff --git a/README.MD b/README.MD index 85ae253..fc8befe 100644 --- a/README.MD +++ b/README.MD @@ -1,7 +1,15 @@ -## Lysand ActivityPub Layer -[![Nix Flake actions](https://github.com/lysand-org/lysand-ap-layer/actions/workflows/nix-flake.yml/badge.svg)](https://github.com/lysand-org/lysand-ap-layer/actions/workflows/nix-flake.yml) -A simple activitypub compatibility layer ("bridge"), to make Lysand compatible with the ActivityPub and ActivityStreams protocol. -The layer is realised in a microservice format. + +

+ Lysand Logo +

+ +## Lysand ActivityPub Bridge + +[![Nix Flake actions](https://github.com/lysand-org/activitypub/actions/workflows/nix-flake.yml/badge.svg)](https://github.com/lysand-org/activitypub/actions/workflows/nix-flake.yml) + +**ActivityPub/ActivityStreams** compatibility layer for [**Lysand Server**](https://github.com/lysand-org/lysand). + +Designed as a microservice, runs as its own process and communicates with the main server via HTTP. ## Development (Flakes) @@ -20,16 +28,22 @@ nix build We also provide a [`justfile`](https://just.systems/) for Makefile'esque commands. -### Building and running the docker image +## Building -To build the docker image, run the following command: +### Docker/Podman + +To build the Docker image, run the following command: ```bash -> docker build -t f:latest . +docker build -t activitypub:latest . ``` -To run the docker image, run the following command: +To run the docker image, use the [`docker-compose.yml`](./docker-compose.yml) file: ```bash -docker run -i -e RUST_LOG="debug" -e DATABASE_URL="postgresql://postgres:postgres@host.docker.internal:5432/database" -e LISTEN="0.0.0.0:8080" -p 8080:8080 f:latest +wget https://raw.githubusercontent.com/lysand-org/activitypub/main/docker-compose.yml + +docker-compose up -d ``` + +If you are building from source, make sure to replace the image name in the `docker-compose.yml` file. \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..0e6d225 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +services: + activitypub: + environment: + - RUST_LOG=debug + - DATABASE_URL=postgresql://postgres:postgres@host.docker.internal:5432/database + - LISTEN=0.0.0.0:8080 + ports: + - 8080:8080 + image: ghcr.io/lysand-org/activitypub:latest