Deployment instructions for RoastLogger.
RoastLogger is deployed on Render's free tier.
- Create Web Service on Render
- Connect GitHub repository
- Configure build settings:
- Build Command:
pip install -r requirements.txt - Start Command:
gunicorn app:app
- Build Command:
Set these in Render dashboard:
| Variable | Description |
|---|---|
FLASK_APP |
app.py |
FLASK_ENV |
production |
SECRET_KEY |
Random string for sessions |
MONGO_URI |
MongoDB Atlas connection string |
MONGO_URI_LOCAL |
Local MongoDB (not used in production) |
DEFAULT_DB |
local by default; switch to online manually when needed |
TZ |
Asia/Taipei |
- Service spins down after 15 minutes of inactivity
- ~30 second cold start delay on first request
- Acceptable for personal use
- Create free M0 cluster on MongoDB Atlas
- Create database user
- Whitelist IP addresses (or allow from anywhere)
- Copy connection string to
MONGO_URI
The application uses two collections:
beans- Coffee bean inventoryroasts- Roasting sessions
- Python 3.x
- MongoDB (local instance)
- pip packages from
requirements.txt
# Clone repository
git clone https://github.com/username/roasting_note.git
cd roasting_note
# Create virtual environment
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
# Install dependencies
pip install -r requirements.txt
# Create .env file
cp .env.example .env
# Edit .env with your settings
# Run development server
flask runFLASK_APP=app.py
FLASK_ENV=development
SECRET_KEY=your-secret-key
MONGO_URI=mongodb+srv://...
MONGO_URI_LOCAL=mongodb://localhost:27017/roastlogger
DEFAULT_DB=local
TEMP_SENSOR_URL=http://192.168.0.47/temp
TZ=Asia/Taipei