A mobile-friendly web application to display available cocktails. Guests can scan a QR code to see what cocktails are available, and admins can manage ingredient availability and cocktail states.
- Mobile-responsive design optimized for phone displays
- Guest page showing available cocktails grouped by main alcohol
- Admin panel for managing ingredient availability
- Automatic cocktail disabling based on missing ingredients
- Manual override capability for specific cocktails
- Auto-refresh on guest page when cocktails are enabled/disabled
- Category override support via YAML configuration
- Health endpoint for Kubernetes deployment
- Python 3.8+
- Flask 3.0.0
- PyYAML 6.0.1
pip install -r requirements.txtADMIN_PASSWORD: Password for admin access (default: “admin”)SECRET_KEY: Secret key for Flask sessions (default: dev key, change in production)
cocktails.yaml: Cocktail definitions (committed to git)ingredients_state.json: Ingredient availability state (gitignored)cocktails_overrides.json: Manual cocktail overrides (gitignored)category_overrides.json: Category overrides (gitignored, if used)
python app.pyThe application will be available at http://localhost:5000
Build the image:
docker build -t cocktail-menu .Run the container:
docker run -p 5000:5000 \
-e ADMIN_PASSWORD=your-secure-password \
-e SECRET_KEY=your-secret-key \
cocktail-menuBuild and push the Docker image:
docker build -t your-registry/cocktail-menu:latest .
docker push your-registry/cocktail-menu:latestUpdate kubernetes.yaml with your image registry and secrets, then deploy:
kubectl apply -f kubernetes.yamlThe deployment includes:
- Persistent volume for state files
- Health checks (liveness and readiness probes)
- ConfigMap for
cocktails.yaml - Secret for admin credentials
- Service and Ingress configuration
Note: Update the cocktails.yaml content in the ConfigMap or use a volume mount for the file.
GET /: Guest page (public)GET /admin: Admin panel (requires authentication)GET /login: Login pageGET /logout: LogoutGET /healthorGET /healthz: Health check endpointGET /api/state: Get current cocktail enabled/disabled state (public)POST /api/toggle-ingredient: Toggle ingredient availability (admin only)POST /api/toggle-cocktail: Toggle manual cocktail override (admin only)
Cocktails are defined in cocktails.yaml. Each cocktail can have:
name: Cocktail namecategory: (Optional) Manual category overrideimage: Image URLingredients: List of ingredients with quantities
Example:
- name: Old Fashioned
category: Bourbon # Optional override
image: https://...
ingredients:
- name: Bourbon
qty: 45
- name: Angostura Bitters
qty: 2 dashesHidden Ingredients
Edit the following variables in app.py:
HIDDEN_INGREDIENTS_GUEST: Ingredients to hide from guest pageHIDDEN_INGREDIENTS_ADMIN: Ingredients to hide from admin checklist
The alcohol whitelist in get_main_alcohol() determines which ingredients are considered alcoholic for categorization. Modify the alcohol_whitelist list to add or remove alcohols.
The application provides health check endpoints for Kubernetes:
GET /healthGET /healthz
Both endpoints return 200 OK when healthy, 503 when unhealthy.
- Change
ADMIN_PASSWORDandSECRET_KEYin production - The admin panel is protected by simple password authentication
- No authentication required for guest page
- State files are gitignored and should be persisted via volumes in Kubernetes
Private project