feat: docker-compose and docker CI pipeline enhancements#838
feat: docker-compose and docker CI pipeline enhancements#838AnishSarkar22 wants to merge 50 commits intoMODSetter:devfrom
Conversation
…ripts for SurfSense
…date service roles
… and improve security defaults
…environment variable references for database and Redis connections
…y and adjust file paths for initialization script
…ecutable bit in Git
…ronment variable definitions
…in Docker deployment documentation
…edit .env.example
|
@AnishSarkar22 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Review by RecurseML
🔍 Review performed on 2e99f1e..d7a5486
✨ No bugs found, your code is sparkling clean
✅ Files analyzed, no issues (16)
• .github/workflows/docker_build.yaml
• Dockerfile.allinone
• docker-compose.quickstart.yml
• docker-compose.yml
• docker/.env.example
• docker/docker-compose.dev.yml
• docker/docker-compose.yml
• docker/scripts/init-electric-user.sh
• docker/scripts/install.sh
• scripts/docker/entrypoint-allinone.sh
• scripts/docker/init-postgres.sh
• scripts/docker/supervisor-allinone.conf
• surfsense_backend/alembic/versions/66_add_notifications_table_and_electric_replication.py
• surfsense_web/Dockerfile
• surfsense_web/docker-entrypoint.js
• surfsense_web/docker-entrypoint.sh
⏭️ Files skipped (1)
| Locations |
|---|
docker/postgresql.conf |
…SENSE_VERSION to latest
…for ports and reverse proxy settings
…xample with connection instructions
…ker setup and clarify update instructions
…s and add concurrency settings
… pgAdmin and frontend build arguments
There was a problem hiding this comment.
Review by RecurseML
🔍 Review performed on d7a5486..6e2a055
✨ No bugs found, your code is sparkling clean
✅ Files analyzed, no issues (8)
• .github/workflows/docker_build.yaml
• README.md
• docker/.env.example
• docker/docker-compose.dev.yml
• docker/docker-compose.yml
• docker/scripts/install.sh
• surfsense_web/content/docs/docker-installation.mdx
• surfsense_web/content/docs/how-to/electric-sql.mdx
Keeps the deletion of Dockerfile.allinone, docker-compose.yml (root), and scripts/docker/entrypoint-allinone.sh from fix/docker. Ports the Daytona sandbox env vars added by upstream/dev into docker/docker-compose.yml and docker/docker-compose.dev.yml instead. Made-with: Cursor
…Docker Compose files for cloud code execution
…figuration clarity
…onsistency in development configuration
…ons for legacy all-in-one users
…or improved visibility
…ata migration process - Updated install.sh to handle fresh installations and migrations from the legacy all-in-one container. - Added checks for Docker and Docker Compose prerequisites. - Implemented a wait-for-postgres function to ensure database readiness. - Enhanced migration script to extract data and recover SECRET_KEY automatically. - Updated documentation to reflect the new automated migration process.
…ing fallback to defaults
…e database migration script
…nd streamline project setup
…or automatic updates
…nclude new Docker command and manual update process
…nd frontend services
…dated steps and options for managing updates
… .env file instead of Docker run command
…ocker installation docs
…ependencies to ensure healthy startup
…ose file details and health check information
…ackend and frontend services
… update logging for migration step
…up with customizable interval
…larify prerequisites and automatic Watchtower setup
Description
docker-compose.dev.ymlwhich uses localsurfsense_webandsurfsense_backedand it supports hot reloading.surfsense-webandsurfsense-backend.migrate-database.shto migrate existing data from the legacy all-in-one container (PostgreSQL 14) to the new PostgreSQL 17install.shwhen the legacy surfsense-data volume is detected.--db-user,--db-password,--db-name) and a--yesflag (used byinstall.shscript) to skip confirmation prompts.0.0.14.2and0.0.14) while keepinglatestunchanged.Motivation and Context
FIX #
Screenshots
API Changes
Change Type
Testing Performed
Checklist
High-level PR Summary
This PR restructures the Docker deployment architecture by splitting the monolithic all-in-one image into separate
surfsense-webandsurfsense-backendimages. The docker-compose configuration has been reorganized into a newdocker/directory with production (docker-compose.yml) and development (docker-compose.dev.yml) variants. The CI pipeline now builds multi-architecture images (amd64/arm64) for both services separately using a matrix strategy. A comprehensive.env.examplefile and one-line installation script have been added to streamline deployment. The frontend image now uses runtime environment variable substitution instead of build-time values, and the Electric SQL user initialization script has been simplified.⏱️ Estimated Review Time: 30-90 minutes
💡 Review Order Suggestion
docker/.env.exampledocker/docker-compose.ymldocker/docker-compose.dev.ymldocker/scripts/install.shdocker/scripts/init-electric-user.sh.github/workflows/docker_build.yamlsurfsense_web/Dockerfilesurfsense_web/docker-entrypoint.shsurfsense_web/docker-entrypoint.jssurfsense_backend/alembic/versions/66_add_notifications_table_and_electric_replication.pyDockerfile.allinonedocker-compose.quickstart.ymldocker-compose.yml