A Javalin-based web service for sending and receiving webmentions.
471
The service is a simple Javalin application that receives webmentions and stores them in a database. It can be run in a container and should be deployed behind a reverse proxy which handles SSL termination and rate limiting. You don't want to be turned into a DDoS zombie. I like nginx.
The service accepts the following environment variables:
# Create your database directory
mkdir data
# Run your container
podman run -d \
--name webmention-service \
-p 8080:8080 \
-e WEBMENTION_SUPPORTED_DOMAINS="example.com,myblog.org" \
-v ./data:/app/data:Z \
docker.io/maritim/webmention-service:latest
services:
webmention:
image: docker.io/maritim/webmention-service:latest
restart: always
environment:
- WEBMENTION_SUPPORTED_DOMAINS=yourdomain.com
- WEBMENTION_DB_CONNECTION_STRING=jdbc:sqlite:/app/data/webmentions.db
volumes:
- ./data:/app/data:Z
ports:
- "127.0.0.1:8080:8080" # Bound to localhost; expose via Nginx
[Unit]
Description=Webmention Service Container
After=network-online.target
[Container]
Image=docker.io/maritim/webmention-service:latest
# Mapping the ports
PublishPort=127.0.0.1:8080:8080
# Environment Variables
Environment=WEBMENTION_SUPPORTED_DOMAINS=example.com,myblog.org
Environment=WEBMENTION_DB_CONNECTION_STRING=jdbc:sqlite:/app/data/webmentions.db
# Persistence (The 'Z' handles SELinux)
Volume=%h/webmention/data:/app/data:Z
# Run as UID 1000
User=1000
[Service]
# Restart the container if it crashes
Restart=always
[Install]
# Start this container when the user logs in / system boots
WantedBy=default.target
Content type
Image
Digest
sha256:ed98350b7…
Size
95.2 MB
Last updated
7 months ago
docker pull maritim/webmention-service