Add Dockerfile for local app container - #34
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docker-entrypoint.shscript before any command executes, so both the defaultuvicornstart and one-off import script invocations land on a migrated schema./data, kept separate from the application code in/app.Test plan
docker build -t mlb-visualizer .succeedsdocker run --rm -p 8000:8000 -v mlb-visualizer-data:/data mlb-visualizerapplies migrations and serves the empty-state UIdocker run --rm -v mlb-visualizer-data:/data mlb-visualizer poetry run python scripts/import_team_season.py --team-id 136 --season 2025imports 162 games into the shared volumeCloses #20
🤖 Generated with Claude Code
https://claude.ai/code/session_01BsBNV3gK66Nb5XAhXdyXYj