Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Keep the build context small now that it's the repo root.
.git
.github
.gitignore
.dockerignore

# Local-only state and docs
data
logo
*.md
LICENSE
docker-compose.yml

# Python cruft
**/__pycache__
**/*.pyc
**/*.pyo
**/*.pyd
**/*.egg-info
**/.venv
**/venv
**/env
**/.pytest_cache
**/.coverage
**/htmlcov
**/.mypy_cache
**/.dmypy.json
**/.ipynb_checkpoints

# Secrets and env
**/*.key
**/*.pem
**/secrets
.env
.env.*

# Editor / OS
.DS_Store
.idea
.vscode
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
- name: Build and push backend image
uses: docker/build-push-action@v6
with:
context: ./backend
context: .
file: ./backend/Dockerfile
push: true
platforms: linux/amd64,linux/arm64/v8
Expand Down
5 changes: 3 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ FROM python:3.13-slim

WORKDIR /backend

COPY requirements.txt .
COPY backend/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY app/ ./app/
COPY backend/app/ ./app/
COPY frontend/ /frontend/

EXPOSE 8000

Expand Down
10 changes: 5 additions & 5 deletions backend/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Test image — mirrors the production Dockerfile, then layers the dev deps on
# top. Build it locally with:
# docker build -f Dockerfile.test -t stackresume-tests .
# docker build -f backend/Dockerfile.test -t stackresume-tests .
# Or just use the compose profile:
# docker compose --profile test up --build --abort-on-container-exit
FROM python:3.13-slim

WORKDIR /backend

# Production deps first so the cache hit pattern matches the prod image.
COPY requirements.txt requirements-dev.txt ./
COPY backend/requirements.txt backend/requirements-dev.txt ./
RUN pip install --no-cache-dir -r requirements-dev.txt

COPY app/ ./app/
COPY tests/ ./tests/
COPY pytest.ini .
COPY backend/app/ ./app/
COPY backend/tests/ ./tests/
COPY backend/pytest.ini .

# Make sure no provider keys leak through the host shell.
ENV OPENAI_API_KEY="" \
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
context: .
dockerfile: backend/Dockerfile
container_name: stackresume-backend
ports:
- "8000:8000"
Expand Down Expand Up @@ -67,8 +67,8 @@ services:
tests:
profiles: ["test"]
build:
context: ./backend
dockerfile: Dockerfile.test
context: .
dockerfile: backend/Dockerfile.test
container_name: stackresume-tests
environment:
# Hard-blank any provider keys so tests never accidentally hit a real LLM.
Expand Down
Loading