Skip to content

Add Dockerfile for local app container - #34

Merged
Mattsface merged 1 commit into
mainfrom
issue-20-dockerfile
Aug 22, 2026
Merged

Add Dockerfile for local app container#34
Mattsface merged 1 commit into
mainfrom
issue-20-dockerfile

Conversation

@Mattsface

Copy link
Copy Markdown
Member

Summary

  • Adds a Dockerfile so the app can be built and run in a container, per Add Dockerfile for local app container #20.
  • Migrations run through a docker-entrypoint.sh script before any command executes, so both the default uvicorn start and one-off import script invocations land on a migrated schema.
  • SQLite persistence uses a named volume mounted at /data, kept separate from the application code in /app.
  • Documents build/run/import commands in the README.

Test plan

  • docker build -t mlb-visualizer . succeeds
  • docker run --rm -p 8000:8000 -v mlb-visualizer-data:/data mlb-visualizer applies migrations and serves the empty-state UI
  • docker run --rm -v mlb-visualizer-data:/data mlb-visualizer poetry run python scripts/import_team_season.py --team-id 136 --season 2025 imports 162 games into the shared volume
  • Restarting/refreshing the app container against the same volume shows the imported Mariners 2025 data without an app restart

Closes #20

🤖 Generated with Claude Code

https://claude.ai/code/session_01BsBNV3gK66Nb5XAhXdyXYj

Adds a build-and-run path so the app can run in a container without a
local Poetry environment. Migrations apply via an entrypoint script
before any command runs, so both the app and one-off import scripts
land on a migrated schema. Persistence uses a named volume mounted at
/data rather than a bind mount, so container code and data stay
separate. Closes #20.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BsBNV3gK66Nb5XAhXdyXYj
@Mattsface
Mattsface merged commit e97a37e into main Aug 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Dockerfile for local app container

1 participant