Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion res/How to Home Server/04 First service.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ services:
privileged: true
# Allow access to the host network for device discovery
# Usually, you wouln't do this either, but for HA we need it
# Because we use the host network we do not need to expose container ports
# Because we use the host network we do not need to expose container ports
network_mode: host
```

Expand Down
43 changes: 43 additions & 0 deletions res/TRMNL Hackathon/Self host larapaper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## Deploy your own Larapaper

To self-host larapaper with serverless transforms, you have to use [our fork](https://github.com/spark-hpi/larapaper) of [larapaper](https://github.com/usetrmnl/larapaper). We will once again use [docker compose](../How to Home Server/03 Installing Docker.md) for this.

We are currently working on merging our fork back into the main repo, but this might take a while. Check for updates on this topic.

Begin by creating a `compose.yaml` with the following contents:

```yml
services:
larapaper:
container_name: larapaper
image: ghcr.io/spark-hpi/larapaper:latest
ports:
- "4567:8080"
environment:
- APP_KEY=base64:<TODO>
- PHP_OPCACHE_ENABLE=1
- TRMNL_PROXY_REFRESH_MINUTES=15
- DB_DATABASE=database/storage/database.sqlite
- TRANSFORM_RUNNER_URL=transform-runner:3000
# - MULTI_USER_MODE=1 # if you are planning to use larapaper with multiple users
volumes:
- database:/var/www/html/database/storage
- storage:/var/www/html/storage/app/public/images/generated
restart: unless-stopped

transform-runner:
container_name: transform-runner
image: ghcr.io/spark-hpi/larapaper-serverless-runner:latest
security_opt: [seccomp=unconfined]
environment:
- TRANSFORM_TIMEOUT=30 # maximum time a transform may run
- TRANSFORM_MEMORY_LIMIT=134217728 # (128MB) the amount of memory a single transform may use, killed if the limit is exceeded

volumes:
database:
storage:
```

Replace `<TODO>` inside the `APP_KEY` with the output of the command `openssl rand -hex 16 | base64`.

For more information, refer to Larapapers [README](https://github.com/spark-hpi/larapaper/blob/main/README.md), create an issue or ask us if you have questions. Pull requests with improvements are also always welcome!
Loading