Lunchtime
Lunchtime is a self-hosted lunch order app with a React frontend, a Python backend, and nginx for reverse proxying.
Getting Started
- Copy and adjust
config.yamlfor your environment. - Create a writable data folder (for SQLite and uploads), for example
.data. - Start the stack with Docker Compose.
Example compose.yml (inspired by src/compose.yml) using images from the Gitea registry:
services:
nginx:
image: nginx:alpine
ports:
- "8080:8080"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- backend
- frontend
restart: unless-stopped
backend:
image: git.sgruber.at/lunchtime/lunchtime-web:backend-latest
volumes:
- ./.data:/app/data
- ./config.yaml:/app/config.yaml:ro
environment:
- APP_ENV=production
- LOG_LEVEL=info
- DB_PATH=/app/data
restart: unless-stopped
frontend:
image: git.sgruber.at/lunchtime/lunchtime-web:frontend-latest
restart: unless-stopped
Then run:
docker compose up -d
Open http://localhost:8080.
Development
Quick Start with Docker Compose
Use the development compose file to run the full stack with hot reload:
cd src
docker compose up -d
This will start the backend and frontend, proxied through Nginx at http://localhost:8080. Also, a Mailpit instance at http://localhost:8081 can be used for monitoring outgoing mail.
Backend Development
The backend is a FastAPI application using SQLite and runs on Python 3.12.
Dockerfile: src/backend/Containerfile - Production build
Development:
cd src/backend
pip install -r requirements.txt
uvicorn app.main:app --reload
Changes to app/ are automatically detected when running with --reload.
Frontend Development
The frontend is a React + TypeScript application using Vite.
Dockerfile:
src/frontend/Containerfile: Multi-target build withdevandprodstages
Use the dev target for hot reload and the prod target for the static production image.
Development:
cd src/frontend
npm install
npm run dev
Open http://localhost:5173 (or the address shown in the terminal).
Contributing
Contributions are welcome! Please follow these guidelines:
- Choose an existing issue or create one first to discuss your changes
- Fork the repository and create a feature branch
- Test your changes in the development environment using
compose.yml - Submit a pull request linking to the related issue