Docker
Package and deploy MuseMVP using a self-hosted Node.js container.
This guide walks you through packaging MuseMVP as a Docker container and deploying it to any container-supported server environment.
Setup Steps
Build the Image
Build locally:
docker build -f Dockerfile -t musemvp:dockerfile-check .For the latest automated pipeline, refer to the MVP Manual: Docker Fully Automated Deployment Script.
Environment Variables
All environment variables are documented in your local .env file — see Quick Start / Environment Variables for details. You can import them directly, with one exception:
DATABASE_CONNECTION_STRATEGY="database_url_first"About the Database Connection Strategy
DATABASE_CONNECTION_STRATEGY=database_url_first is required. It tells the app to use a standard direct connection at startup.
Run the Container
Start locally to verify everything works:
docker run --env-file .env -p 3000:3000 musemvp:dockerfile-checkOnce verified, push the image to any container registry (e.g. Docker Hub, GHCR, Alibaba Cloud ACR) and pull it on your target server.
Troubleshooting
Most deployment failures are caused by missing or misconfigured environment variables — check those first.
Cannot Connect to Database Inside Container
If PostgreSQL runs in the same docker-compose network as the app, replace localhost in DATABASE_URL with the corresponding service name (e.g. db).