Docker Compose is the recommended way to run the full Stay Sidekick stack locally — it starts all five services (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sdurutr436/stay-sidekick/llms.txt
Use this file to discover all available pages before exploring further.
nginx, frontend, web, backend, postgres) with a single command and wires them together on an internal Docker network called app-net. Only nginx publishes a port to the host (80:80); every other service communicates exclusively over the internal network by service name.
Prerequisites
Make sure the following tools are installed before continuing:| Tool | Minimum version |
|---|---|
| Docker | 24+ |
| Docker Compose | v2 (plugin — ships with Docker Desktop and recent Docker Engine releases) |
| Git | Any recent version |
Prepare environment files
Stay Sidekick requires two Open Open
.env files before the stack can start. Both are versioned as .env.example files — copy them and fill in the required values.Root .env — PostgreSQL credentials:.env and set a secure value for POSTGRES_PASSWORD. If you change POSTGRES_PASSWORD you must also update the password segment of DATABASE_URL to match.backend/.env — Flask API secrets:backend/.env and set at minimum these three variables:| Variable | How to generate |
|---|---|
SECRET_KEY | python -c "import secrets; print(secrets.token_urlsafe(32))" |
JWT_SECRET_KEY | python -c "import secrets; print(secrets.token_urlsafe(32))" |
FERNET_KEY | python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())" |
web/.env ships with a Cloudflare Turnstile test key that is always valid in development — no changes needed there for local use.Build images and start the stack
nginx, frontend, web, backend). Subsequent starts reuse the layer cache and are much faster.To watch all service logs in real time during startup, omit -d:Verify all services are healthy
Check that all five containers are running:Expected output:Confirm the API is reachable through nginx:
Service URLs
All traffic enters through the nginx reverse proxy on port 80. nginx routes requests to the appropriate internal service by path prefix.| URL | Service | Description |
|---|---|---|
http://localhost/ | web | 11ty static public site |
http://localhost/menu/ | frontend | Angular 21 SPA (operations panel) |
http://localhost/api/ | backend | Flask REST API |
Useful Docker commands
Troubleshooting
DATABASE_URL variable is not set
The root .env file is missing. Run cp .env.example .env and set POSTGRES_PASSWORD.
502 Bad Gateway from nginx
nginx cannot resolve an upstream service hostname on the internal app-net network. This usually means a service failed to start cleanly. Run docker compose ps to identify which container is not running, then inspect its logs:
Tables are missing / schema was not applied The PostgreSQL schema (
backend/db/schema.sql) is applied only on the very first creation of the postgres_data volume. If the volume already exists from a previous run that failed mid-init, the init scripts are skipped. Reset everything with:
Flask does not start:
KeyError: 'SECRET_KEY'
The SECRET_KEY variable is required and was not found. Verify that backend/.env exists and contains a non-empty SECRET_KEY value.
Port 80 is already in use Another process on your machine is listening on port 80. Either stop it, or change the nginx port mapping in
docker-compose.yml from "80:80" to "8080:80" and access the app on http://localhost:8080/ instead.
