Skip to content

feat: production-ready dockerfile and environment variable support - #67

Merged
kacy merged 4 commits into
mainfrom
feat/docker-env-production
Feb 8, 2026
Merged

feat: production-ready dockerfile and environment variable support#67
kacy merged 4 commits into
mainfrom
feat/docker-env-production

Conversation

@kacy

@kacy kacy commented Feb 8, 2026

Copy link
Copy Markdown
Owner

summary

makes the docker image production-ready and adds environment variable support for all server configuration options.

  • env var support: every clap arg now accepts an EMBER_* env var (e.g. EMBER_PORT=6380), standard for container deployments
  • dockerfile rewrite: multi-stage build with debian:bookworm-slim (stable, not trixie/testing), non-root ember user (uid 65532), /data volume for persistence, EMBER_HOST=0.0.0.0 default for container networking, OCI labels
  • .dockerignore: excludes target/, bench/, docs/, tests/, clients/, and markdown files from build context
  • make docker-run: builds and runs the container with port 6379 forwarded

what was tested

  • cargo build -p ember-server — compiles cleanly with env attrs
  • cargo test -p ember-server — all 32 tests pass
  • verified env vars show up in --help output via clap

design considerations

  • chose debian:bookworm-slim over distroless because TLS needs ca-certificates and libssl3, and bookworm is the current stable release (trixie is testing)
  • jemalloc is included via default features — no --features flag needed in the build
  • ENTRYPOINT ["ember-server"] with no hardcoded flags — all config flows through env vars or CMD args
  • non-root user uses uid 65532 (common convention for unprivileged container users)

kacy added 3 commits February 8, 2026 18:48
every clap arg now accepts an EMBER_* env var, making it easy to
configure the server in containers without wrapper scripts.
excludes target/, bench/, docs/, tests/, clients/, and markdown
files from the docker build context.
multi-stage build with bookworm-slim, non-root user (uid 65532),
jemalloc via default features, /data volume for persistence, and
OCI labels. sets EMBER_HOST=0.0.0.0 for container networking.
@kacy
kacy force-pushed the feat/docker-env-production branch from 2c1b8b8 to 3e349e6 Compare February 8, 2026 23:50
builds and runs the container with port 6379 forwarded for quick
local testing.
@kacy
kacy force-pushed the feat/docker-env-production branch from 3e349e6 to d0bbf45 Compare February 8, 2026 23:53
@kacy
kacy merged commit 96c85f2 into main Feb 8, 2026
5 checks passed
@kacy
kacy deleted the feat/docker-env-production branch February 8, 2026 23:53
kacy added a commit that referenced this pull request Feb 11, 2026
* feat: add environment variable support for all server options

every clap arg now accepts an EMBER_* env var, making it easy to
configure the server in containers without wrapper scripts.

* feat: add .dockerignore to reduce build context

excludes target/, bench/, docs/, tests/, clients/, and markdown
files from the docker build context.

* feat: production-ready dockerfile

multi-stage build with bookworm-slim, non-root user (uid 65532),
jemalloc via default features, /data volume for persistence, and
OCI labels. sets EMBER_HOST=0.0.0.0 for container networking.

* feat: add docker-run makefile target

builds and runs the container with port 6379 forwarded for quick
local testing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant