Skip to content

Commit

Permalink
feat(docker): add docker-compose override for local development
Browse files Browse the repository at this point in the history
- Added `docker-compose.override.yml` to enable local development configurations.
- Mounted local code (`.:/code`) in the `api` container for live updates.
- Configured FastAPI to auto-reload on code changes (`--reload`).
- Passed `REDIS_PASSWORD` from `.env` to allow local Redis authentication.
- Ensured Redis runs with `--requirepass` for local security.
  • Loading branch information
ddayto21 committed Feb 11, 2025
1 parent c723240 commit 6024b0e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions backend/docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: "3.8"

services:
api:
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD} # Use local Redis password
volumes:
- .:/code # Mount local code for live updates
command: ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]

redis:
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD}"]

0 comments on commit 6024b0e

Please sign in to comment.