terainia/docker-compose.yml
Maximus Gorog f239a939ce Add Docker + Caddy deploy for voxel.mxvs.art
Multi-stage Dockerfile compiles wasm client + axum server in one Rust
builder and copies into a debian:bookworm-slim runtime (non-root uid).
docker-compose.yml binds localhost:8080 by default; docker-compose.prod.yml
replaces ports with a Caddy reverse proxy on host 80/443 that talks to
the voxel container over the internal network. Caddy auto-issues Let's
Encrypt certs.

DEPLOY.md covers the three deployment modes (local-only, VPS with
Cloudflare or Caddy, Cloudflare Tunnel from a workstation).
2026-05-23 18:45:05 -06:00

18 lines
661 B
YAML

services:
voxel:
build: .
image: voxel-game:latest
container_name: voxel-game
restart: unless-stopped
# Bind to 127.0.0.1 by default so the container isn't accidentally
# public when running on a workstation. Override the LHS to 0.0.0.0
# in your deploy environment (or via docker-compose.override.yml) if
# you want the host's external interface to serve it.
ports:
- "127.0.0.1:8080:8080"
environment:
# voxel-server reads these. STATIC_DIR is baked in by the Dockerfile,
# but you can override them here if mounting a different web/ from
# the host.
PORT: "8080"
RUST_LOG: "info"