To initialize the FrequencyWords submodule for local development:
# Initialize submodules
bun run submodule:init
This will:
- Initialize the FrequencyWords submodule
- Fetch all files from the repository
- Make them available for local development
We use a two-tier approach for FrequencyWords files in production:
When building through GitHub Actions (Porter deployment):
- The submodule is explicitly initialized with
submodules: 'recursive'
- All FrequencyWords files are included directly in the Docker image
- No runtime downloads needed
If the Docker image is built manually without submodule initialization:
- Base directories are created during build
- Our startup script checks for missing files
- Any missing files are downloaded at runtime using Node.js
- No external tools required (uses built-in https module)
Our Porter deployments use GitHub Actions with proper submodule handling:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code with submodules
uses: actions/checkout@v3
with:
submodules: 'recursive' # This ensures FrequencyWords is properly fetched
# Build and push to registry, then deploy to Porter
The workflow is designed to:
- Properly fetch all FrequencyWords files during checkout
- Include them in the Docker image during build
- Ensure no runtime downloads are needed in production