Remove submodules and use pipeline artifacts#12
Open
rubenhensen wants to merge 5 commits intomainfrom
Open
Conversation
This removes the cryptify and postguard-tb-addon submodules and replaces them with artifacts from their respective pipelines. Changes: - Remove .gitmodules and both submodules (cryptify, postguard-tb-addon) - Update Dockerfile to download tb-addon .xpi from GitHub releases - Remove submodule checkout and build steps from GitHub workflow - Remove cryptify and tb-addon build jobs from GitLab CI - Simplify build-image job dependencies Benefits: - Faster onboarding - no submodule management required - Consistent builds using verified artifacts from CI/CD - Simplified development workflow - Reduced repository complexity The tb-addon is now downloaded during Docker build from: https://github.com/encryption4all/postguard-tb-addon/releases Relates to #11
Instead of pinning to a specific version, the Dockerfile now automatically fetches and downloads the latest release from GitHub using the GitHub API. This eliminates the need to manually update the version in the Dockerfile when new releases are published.
Instead of downloading and bundling the tb-addon .xpi in the Docker image, nginx now redirects download requests directly to GitHub's latest release. Changes: - Removed tb-addon download step from Dockerfile (simpler, smaller image) - Added nginx location to redirect /downloads/postguard-tb-addon.xpi to GitHub - Uses GitHub's /releases/latest/download/ URL pattern Benefits: - Docker image never needs rebuilding for tb-addon updates - Always serves the absolute latest release automatically - Smaller Docker image (no bundled .xpi) - No periodic checks needed - GitHub handles it Note: Requires tb-addon repo to upload a file named 'postguard-tb-addon.xpi' (without version number) to releases, in addition to the versioned file.
Added comprehensive Docker Compose setup for easy local development and production deployment with all required services. New files: - docker-compose.dev.yml - Development with hot reload - docker-compose.yml - Production deployment - docker/dev.Dockerfile - Development container - .dockerignore - Optimized Docker builds - .env.staging - Staging environment configuration Updated files: - .env.example - Updated with localhost URLs and renamed to VITE_FILEHOST_URL - README.md - Comprehensive Docker Compose documentation Services included: 1. cryptify-backend (port 8000) - Filehosting with Cryptify 2. postguard-pkg (port 8087) - Private Key Generator 3. mailcrab (ports 1080, 1025) - Email testing 4. postguard-website - Main application (port 5173 dev / 80 prod) Features: - Development mode with hot reload and mounted volumes - Production mode with full nginx build - All services use :edge tags for latest builds - Easy to swap services for local development - Clear documentation for developing individual services Usage: - Dev: docker-compose -f docker-compose.dev.yml up - Prod: docker-compose up --build
Added redirects for:
- /downloads/updates.json -> latest release updates.json
- /downloads/v{version}/postguard-tb-addon-{version}.xpi -> versioned .xpi
- /downloads/v{version}/updates.json -> versioned updates.json
This allows Thunderbird to check for updates via updates.json and
download specific versions when needed, all served from GitHub releases.
Examples:
- /downloads/updates.json
- /downloads/v0.7.9/postguard-tb-addon-0.7.9.xpi
- /downloads/v0.7.9/updates.json
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
This PR removes the
cryptifyandpostguard-tb-addongit submodules and adds comprehensive Docker Compose setups for easy development and production deployment.Changes
Submodules Removed
cryptifysubmodule - now uses container imagepostguard-tb-addonsubmodule - now redirects to GitHub releasesDocker Compose Added
New Files:
docker-compose.dev.yml- Development environment with hot reloaddocker-compose.yml- Production deploymentdocker/dev.Dockerfile- Development container.dockerignore- Optimized Docker builds.env.staging- Staging environment configurationServices Included:
All services use
:edgetags to always get the latest builds.Dockerfile Updates
Nginx Configuration
Added a redirect that serves the latest tb-addon release:
Configuration Updates
VITE_BACKEND_URL→VITE_FILEHOST_URL(Cryptify is the filehosting service)VITE_PKG_URLto point to port 8087.env.examplewith localhost URLs for Docker Compose usageCI/CD Updates
GitHub Workflow (
.github/workflows/docker-build.yml):submodules: recursivefrom checkoutGitLab CI (
.gitlab-ci.yml):GIT_SUBMODULE_STRATEGY: recursivebuild-cryptifyjobbuild-downloadsjobbuild-imagedependenciesDocumentation
README.md now includes:
Benefits
✅ Faster onboarding -
docker-compose upstarts everything✅ Hot reload - Dev mode mounts source code for instant updates
✅ Easy service swapping - Comment out a service to run locally
✅ Always up-to-date - Users always get latest addon release
✅ Zero maintenance - No need to rebuild Docker for addon updates
✅ Smaller image - No bundled addon in the Docker image
✅ Simpler workflow - No submodule management needed
✅ Reduced complexity - 397 lines added, 61 removed
Quick Start
Development
docker-compose -f docker-compose.dev.yml up # Access at http://localhost:5173Production
docker-compose up --build # Access at http://localhostDevelop Individual Services
Comment out the service in docker-compose and run locally:
Requirements
postguard-tb-addonrepository must upload a file namedpostguard-tb-addon.xpi(without version number) to each release for the/releases/latest/download/URL to work.Related Issues
Closes #11