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:
22
README.md
22
README.md
@@ -4,14 +4,7 @@ A spending tracker web application built with Flask.
|
||||
|
||||
## Setup
|
||||
|
||||
### 1. Install Dependencies
|
||||
|
||||
```bash
|
||||
cd src
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
### 2. Create Environment Files
|
||||
### 1. Create Environment Files
|
||||
|
||||
Copy the example file and configure for your environment:
|
||||
|
||||
@@ -33,17 +26,22 @@ Generate secure keys with:
|
||||
python -c "import secrets; print(secrets.token_hex(32))"
|
||||
```
|
||||
|
||||
### 2. Build Docker Image
|
||||
|
||||
```bash
|
||||
docker build -t kebuu .
|
||||
```
|
||||
|
||||
### 3. Run the Application
|
||||
|
||||
**Development:**
|
||||
```bash
|
||||
cd src
|
||||
python app.py
|
||||
docker run -p 5000:5000 --env-file .env.dev -v $(pwd)/src:/app kebuu
|
||||
```
|
||||
The volume mount (`-v`) enables live code reloading during development.
|
||||
|
||||
**Production (Docker):**
|
||||
**Production:**
|
||||
```bash
|
||||
docker build -t kebuu .
|
||||
docker run -p 5000:5000 --env-file .env.prod kebuu
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user