Skip to content
Documentation
Documentation

Docker Compose

Add mus-server as a service in docker-compose.yml. Your frontend’s nginx reaches it by service name over the internal Docker network with no exposed port needed.

services:
frontend:
build: .
ports:
- "80:80"
environment:
- MUS_SERVER_ADDR=mus-server:3001 # nginx reads this to proxy /api/mus/
depends_on:
- mus-server
mus-server:
image: ghcr.io/datachefhq/mus-server:latest
environment:
- SLACK_BOT_TOKEN=${SLACK_BOT_TOKEN}
# No ports needed — only the frontend nginx reaches it internally
.env
SLACK_BOT_TOKEN=xoxb-your-token

Start both services:

Terminal window
docker compose up -d

Use docker-compose.override.yml to swap the frontend container for the Vite dev server during local development. The Vite proxy config handles /api/mus/ forwarding, so nginx is bypassed entirely.

docker-compose.override.yml
services:
frontend:
build: null
image: node:20-alpine
command: npm run dev
volumes:
- .:/app
working_dir: /app
ports:
- "5173:5173"
environment: {}

With this override, docker compose up runs vite dev for the frontend and mus-server for the backend. Voice, thumbs, and support all work via the Vite proxy.

Terminal window
# Check logs
docker compose logs mus-server
# Health check
curl http://localhost:3001/healthz
# → ok

Once your app is containerised, see nginx for proxying /api/mus/ to mus-server.