Docker: add .env.example, .dockerignore; polish README Docker section
- Add .env.example (referenced by README Quick Start; populates SECRET_KEY/POSTGRES_*/AUTH0_* used by docker-compose). - Add .dockerignore so `COPY . .` no longer bakes .git, __pycache__, venv, local data, and secrets into the image. - Rewrite README Docker Deployment into a single `docker compose up -d --build` flow on port 5021; fix local-dev access port 5000->5021. - Drop obsolete `version: '3.8'` from docker-compose.yml. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
37
README.md
37
README.md
@@ -58,26 +58,41 @@ A Reddit-style content aggregator that collects posts from multiple platforms (R
|
||||
```
|
||||
|
||||
7. **Access the application**
|
||||
- Open browser to `http://localhost:5000`
|
||||
- Open browser to `http://localhost:5021`
|
||||
- Create an account or browse anonymously
|
||||
|
||||
### Docker Deployment
|
||||
|
||||
1. **Build the image**
|
||||
The included `docker-compose.yml` runs the app plus a PostgreSQL database, with persistent volumes for the database, collected posts, and backups.
|
||||
|
||||
1. **Configure environment**
|
||||
```bash
|
||||
cp .env.example .env
|
||||
# Edit .env — at minimum set SECRET_KEY to a long random string
|
||||
```
|
||||
|
||||
2. **Build and start the stack**
|
||||
```bash
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
3. **Access the application**
|
||||
- Open browser to `http://localhost:5021`
|
||||
- Create an account or browse anonymously
|
||||
|
||||
Useful commands:
|
||||
```bash
|
||||
docker compose logs -f app # follow app logs
|
||||
docker compose down # stop the stack (keeps data volumes)
|
||||
docker compose down -v # stop and delete all data volumes
|
||||
```
|
||||
|
||||
To publish the image to the registry instead of building locally:
|
||||
```bash
|
||||
docker build -t git.scorpi.us/chelsea/balanceboard:latest .
|
||||
```
|
||||
|
||||
2. **Push to registry**
|
||||
```bash
|
||||
docker push git.scorpi.us/chelsea/balanceboard:latest
|
||||
```
|
||||
|
||||
3. **Deploy with docker-compose**
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
See [DEPLOYMENT.md](DEPLOYMENT.md) for detailed deployment instructions.
|
||||
|
||||
## Configuration
|
||||
|
||||
Reference in New Issue
Block a user