Files

51 lines
1.5 KiB
YAML
Raw Permalink Normal View History

2026-11-21 12:27:13 +01:00
# Meow v2 relay server + Redis.
#
# cp .env.example .env # then edit
# docker compose up -d
#
# Put an HTTPS reverse proxy in front (MEOWSRV_PUBLIC_URL must be the URL clients use).
# Runs next to the v1 server (8080) by default: host port 8081.
services:
meowsrv:
image: ${MEOWSRV_IMAGE:-meowsrv:v2}
container_name: meowsrv2
restart: unless-stopped
depends_on:
redis:
condition: service_healthy
ports:
- "${MEOWSRV_PORT:-8081}:8080"
environment:
MEOWSRV_LISTEN: 0.0.0.0:8080
MEOWSRV_PUBLIC_URL: ${MEOWSRV_PUBLIC_URL:?set MEOWSRV_PUBLIC_URL in .env}
MEOWSRV_NAME: ${MEOWSRV_NAME:-meow}
MEOWSRV_DESCRIPTION: ${MEOWSRV_DESCRIPTION:-}
MEOWSRV_STORAGE: redis://redis:6379/0
MEOWSRV_KEY_FILE: /data/server.key
MEOWSRV_MAILBOX_TTL_DAYS: ${MEOWSRV_MAILBOX_TTL_DAYS:-30}
MEOWSRV_LOG: ${MEOWSRV_LOG:-info}
volumes:
# The server's identity (its key is pinned by every client: back it up).
- meowsrv-data:/data
read_only: true
cap_drop: [ALL]
security_opt: ["no-new-privileges:true"]
redis:
image: redis:7-alpine
container_name: meowsrv2-redis
restart: unless-stopped
# Not published on the host: only meowsrv talks to it.
command: ["redis-server", "--appendonly", "yes", "--save", "", "--maxmemory-policy", "noeviction"]
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
volumes:
meowsrv-data:
redis-data: