Sign inSign up

jstgnkl/emdash

By jstgnkl

•Updated 4 months ago

A docker container for running EmDash CMS https://github.com/emdash-cms/emdash

Image
Web servers
Content management system
0

7.8K

jstgnkl/emdash repository overview

⁠docker-emdash

Build and Push Docker Image

Docker image for EmDash⁠, the Astro-based CMS. Runs the blog template with Node.js and SQLite -- no Cloudflare account required.

Breaking change in 0.5: the PUBLIC_ORIGIN environment variable has been replaced by EMDASH_SITE_URL (upstream EmDash's name for the same value). If you were using PUBLIC_ORIGIN on an earlier tag, rename it in your compose or docker run command before upgrading.

⁠Image tags

TagDescription
latestNightly build from the latest upstream source
x.y.z (e.g. 1.0.0)Verified working release, manually checked

⁠Quick start

docker run -d -p 4321:4321 jstgnkl/emdash:latest

Open http://localhost:4321⁠ for the site and http://localhost:4321/_emdash/admin⁠ for the admin panel.

name: emdash

services:
  emdash:
    image: jstgnkl/emdash:latest
    container_name: emdash
    environment:
      - EMDASH_SITE_URL=${EMDASH_SITE_URL:-}
    ports:
      - "4321:4321"
    volumes:
      - emdash-data:/app/data
      - emdash-uploads:/app/uploads
    restart: unless-stopped

volumes:
  emdash-data:
  emdash-uploads:
docker compose up -d
docker compose down      # stop
docker compose logs -f   # tail logs
docker compose down -v   # stop and delete all data

⁠Reverse proxy setup

When running behind a TLS-terminating reverse proxy (Traefik, Caddy, nginx, etc.), set the EMDASH_SITE_URL environment variable to your public URL. EmDash reads it at runtime to drive WebAuthn passkey origin matching, CSRF, OAuth redirects, and other origin-dependent features -- no rebuild needed.

docker run -d -p 4321:4321 -e EMDASH_SITE_URL=https://emdash.example.com jstgnkl/emdash:latest

Or in Docker Compose:

EMDASH_SITE_URL=https://emdash.example.com docker compose up -d

Forwarding X-Forwarded-Proto: https and X-Forwarded-Host: <your hostname> from the reverse proxy is recommended for general correctness (logging, third-party middleware) but is not required for passkeys to work -- origin resolution comes from EMDASH_SITE_URL, not the forwarded headers.

Without EMDASH_SITE_URL, passkey registration/login will fail with origin mismatch errors because the container only sees the internal HTTP origin.

⁠Configuration

VariableDefaultDescription
EMDASH_SITE_URL(unset)Public HTTPS origin for reverse proxy setups (e.g. https://emdash.example.com)
HOST0.0.0.0Address to bind
PORT4321Port to listen on

To change the port mapping:

ports:
  - "8080:4321"

⁠Volumes

VolumeContainer pathPurpose
emdash-data/app/dataSQLite database
emdash-uploads/app/uploadsUploaded media files

⁠Building from source

To build the image yourself from the emdash source⁠:

git clone https://github.com/emdash-cms/emdash.git
docker build -f Dockerfile ../emdash -t emdash

⁠What's included

  • Runtime: Node.js 22
  • Database: SQLite (via better-sqlite3)
  • Storage: Local filesystem
  • Auth: Passkey authentication (WebAuthn), with reverse proxy support
  • Demo content: Seeded automatically on first start

Tag summary

Content type

Image

Digest

sha256:37b92f9f8…

Size

184.5 MB

Last updated

4 months ago

docker pull jstgnkl/emdash