DocumentationDeployment
Rust · 0.1.0
Docker Compose
Keep a local deployment definition next to your source checkout.
A local starting point
Save this example as compose.yaml at the application repository root. It builds the same local Rust image as the Docker guide, binds only to loopback, and stores data in a named volume. It is a starting template, not a production deployment that has been tested on your host.
services:
memos:
build:
context: .
dockerfile: scripts/Dockerfile
image: memos:local
restart: unless-stopped
ports:
- "127.0.0.1:5230:5230"
volumes:
- memos-data:/var/opt/memos
volumes:
memos-data:
Start and inspect
Validate the file before starting it. Keep a copy of the compose file alongside your backup records. Avoid docker compose down -v when you want to retain notes: the volume flag removes managed volumes. Add TLS through a reverse proxy before external access.
docker compose config --quiet
docker compose up -d --build
docker compose logs --tail 100 memos