Skip to content

Commit

Permalink
standalone-server: add Compose file with local Yjs + Kroki
Browse files Browse the repository at this point in the history
  • Loading branch information
agarciadom committed Feb 23, 2025
1 parent 86978e4 commit f75043e
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
18 changes: 16 additions & 2 deletions standalone-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ java -jar build/libs/standalone-server-0.1-SNAPSHOT-all.jar

You can download the latest `-all.jar` directly from [Github Packages](https://github.com/epsilonlabs/playground-backend/packages/2333178).

## Running from the Docker image
## Running from Docker

To run the standalone Playground server directly from Docker, run:

Expand All @@ -65,4 +65,18 @@ docker run --rm -v ./shorturl:/var/share/shorturl -p 8080:8080 ghcr.io/epsilonla
```

Besides the `latest` tag, other tags are supported.
See [the full list](https://github.com/epsilonlabs/playground-backend/pkgs/container/playground-backend%2Fstandalone-server).
See [the full list](https://github.com/epsilonlabs/playground-backend/pkgs/container/playground-backend%2Fstandalone-server).

## Running from Docker Compose

This project includes a Docker Compose [`compose.yml`](./compose.yml) file which will start a local copy of the playground, as well as local instances of Yjs and Kroki, and keep "Share" files in a named Docker volume.

To use it, run this command from this directory:

```bash
docker compose up -d
```

After some time, the local playground will be accessible from:

http://localhost:8080
30 changes: 30 additions & 0 deletions standalone-server/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
services:
playground:
image: ghcr.io/epsilonlabs/playground-backend/standalone-server:latest
ports:
- 8080:8080
volumes:
- shorturl:/var/share/shorturl
depends_on:
- kroki
- yjs
environment:
- PLAYGROUND_YJS_URL=ws://localhost:8082/ws/
- PLAYGROUND_KROKI_URL=http://localhost:8081
kroki:
image: yuzutech/kroki:latest
ports:
- 8081:8000
yjs:
image: ghcr.io/epsilonlabs/yjs-websocket-nginx:latest
platform: linux/amd64
ports:
- 8082:80
healthcheck:
test: curl --fail http://localhost || kill 1
interval: 1m30s
timeout: 30s
start_period: 30s
restart: always
volumes:
shorturl:

0 comments on commit f75043e

Please sign in to comment.