This guide explains how to set up and run the Cocktail Manager in Demo Mode.
Demo Mode allows potential customers to try the software without requiring login credentials. Each visitor can create a demo workspace with pre-configured data that is automatically deleted after 24 hours.
- Start the demo instance:
The demo uses a pre-built Docker image from GitHub Container Registry. Simply start the containers:
docker-compose -f docker-compose.demo.yaml up -dNote: The image is automatically built and pushed to ghcr.io/jo-gross/cocktail-manager-demo:latest via GitHub Actions when changes are pushed to the main branch.
To build locally instead (e.g., for development), uncomment the build section and comment out the image line in docker-compose.demo.yaml, then run:
docker-compose -f docker-compose.demo.yaml up -d --build- Access the demo:
Open your browser and navigate to http://localhost:3001
- Click "Demo starten" to create a demo workspace
The demo instance uses the following environment variables (set in docker-compose.demo.yaml):
DEMO_MODE=true- Enables demo modeDEMO_WORKSPACE_CONFIG_PATH=/app/config/demo-workspace-config.json- Path to demo configurationDEMO_TTL_HOURS=24- Time-to-live for demo workspaces in hours
Edit config/demo-workspace-config.json to customize the demo data:
- Workspace name and description
- Cocktail recipes with ingredients, steps, and garnishes
- Glasses
- Ingredients
- Garnishes
The cleanup job runs automatically every hour via a cron job in the cleanup-cron container. It:
- Finds all expired demo workspaces (where
expiresAt < now()) - Deletes expired workspaces and all related data
- Deletes demo users if they have no remaining workspaces
You can also trigger cleanup manually:
# Via API endpoint (if running)
curl -X POST http://localhost:3001/api/demo/cleanup
# Or directly via script
docker exec cocktail-manager-demo-cleanup node scripts/cleanup-demo-workspaces.jsThe demo instance uses different ports to avoid conflicts with production:
- Application:
3001(instead of 3000) - PostgreSQL:
5433(instead of 5432) - Chromium:
9223(instead of 9222)
The demo uses a separate database (cocktail_recipe_demo) to ensure complete isolation from production data.
docker-compose -f docker-compose.demo.yaml downTo also remove volumes (including database data):
docker-compose -f docker-compose.demo.yaml down -vCheck the cleanup logs:
docker logs cocktail-manager-demo-cleanupEnsure the postgres container is running:
docker ps | grep postgres-demoMake sure the config directory is mounted correctly. The docker-compose file mounts ./config:/app/config:ro
The demo uses a pre-built Docker image from GitHub Container Registry:
- Image:
ghcr.io/jo-gross/cocktail-manager-demo:latest - Built via: GitHub Actions (
.github/workflows/build-demo-image.yml) - Build args:
DEPLOYMENT=demo,DEMO_MODE=true
The image is automatically built and pushed when:
- A GitHub Release is published
- Workflow is manually triggered via GitHub Actions UI
The image version is automatically read from package.json and used as the image tag.
The workflow creates two tags for each build:
<version>- Version frompackage.json(e.g.,1.17.1)latest- Always points to the latest published release
Example: If package.json has version 1.17.1, the image will be tagged as:
ghcr.io/jo-gross/cocktail-manager-demo:1.17.1ghcr.io/jo-gross/cocktail-manager-demo:latest
To pull the latest image manually:
docker pull ghcr.io/jo-gross/cocktail-manager-demo:latestNote: You may need to authenticate with GitHub Container Registry:
echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdinFor production deployment, ensure:
- Set a strong
BETTER_AUTH_SECRET - Set the correct
BETTER_AUTH_URL - Use proper database credentials
- Configure authentication providers if needed (see
docs/AUTH.md)