Use Docker for local development environment

- Update README and CLAUDE.md with Docker-based dev workflow
- Add Dockerfile for containerized deployment
- Add gunicorn to requirements.txt
- Dev uses volume mount for live code reloading

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-19 20:41:48 -05:00
parent 10407415f0
commit f7d010f28d
4 changed files with 49 additions and 23 deletions

View File

@@ -17,7 +17,7 @@ Kebuu is a spending tracker web app built with Flask. Currently in early develop
- **Backend**: Flask 3.0, SQLAlchemy, Flask-Login
- **Auth**: bcrypt password hashing, Altcha CAPTCHA (self-hosted)
- **Forms**: Flask-WTF with CSRF protection
- **Server**: Gunicorn (production), Flask dev server (local)
- **Server**: Docker + Gunicorn (dev and prod)
- **Database**: SQLite (dev), PostgreSQL (prod)
## Directory Structure
@@ -42,23 +42,24 @@ src/
## Commands
### Local Development
```bash
cd src
pip install -r requirements.txt
python app.py
```
### Docker
### Build
```bash
docker build -t kebuu .
```
### Development
```bash
docker run -p 5000:5000 --env-file .env.dev -v $(pwd)/src:/app kebuu
```
### Production
```bash
docker run -p 5000:5000 --env-file .env.prod kebuu
```
### Testing
```bash
cd src
python -m unittest discover
docker run --env-file .env.dev kebuu python -m unittest discover
```
## Environment Variables