chore: add Docker dev files and ignore .sql database dumps

Added Dockerfile.dev for backend and frontend, docker-compose.dev.yml
for local development. Added *.sql to .gitignore to prevent accidental
commit of database dumps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-03-01 19:00:46 -05:00
parent e25f041332
commit 554ad84d9e
4 changed files with 92 additions and 0 deletions

3
.gitignore vendored
View File

@@ -210,6 +210,9 @@ __marimo__/
.claude/ .claude/
.agents/ .agents/
# Database dumps
*.sql
# Temp/generated files # Temp/generated files
backend/test_results.txt backend/test_results.txt
frontend/stats.html frontend/stats.html

15
backend/Dockerfile.dev Normal file
View File

@@ -0,0 +1,15 @@
FROM python:3.12-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
gcc \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt requirements-dev.txt ./
RUN pip install --no-cache-dir -r requirements-dev.txt
EXPOSE 8000
CMD [ "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload" ]

64
docker-compose.dev.yml Normal file
View File

@@ -0,0 +1,64 @@
name: resolutionflow
services:
db:
image: postgres:16-alpine
container_name: resolutionflow_postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: resolutionflow
ports:
- "5432:5432"
volumes:
- rf_postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile.dev
container_name: resolutionflow_backend
ports:
- "8000:8000"
volumes:
- ./backend:/app
environment:
- APP_NAME=ResolutionFlow
- DEBUG=true
- DATABASE_URL=postgresql+asyncpg://postgres:postgres@db:5432/resolutionflow
- DATABASE_URL_SYNC=postgresql://postgres:postgres@db:5432/resolutionflow
- SECRET_KEY=${SECRET_KEY}
- ALGORITHM=HS256
- ACCESS_TOKEN_EXPIRE_MINUTES=15
- REFRESH_TOKEN_EXPIRE_DAYS=7
- FEEDBACK_EMAIL=feedback@resolutionflow.com
- AI_PROVIDER=anthropic
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
- GOOGLE_AI_API_KEY=${GOOGLE_AI_API_KEY}
- CORS_ORIGINS=["http://localhost:3000","http://localhost:5173"]
depends_on:
db:
condition: service_healthy
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
container_name: resolutionflow_frontend
ports:
- "5173:5173"
volumes:
- ./frontend:/app
- /app/node_modules
environment:
- VITE_API_URL=http://localhost:8000
depends_on:
- backend
volumes:
rf_postgres_data:

10
frontend/Dockerfile.dev Normal file
View File

@@ -0,0 +1,10 @@
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
EXPOSE 5173
CMD [ "npm", "run", "dev", "--", "--host", "0.0.0.0" ]