Dockerfiles for backend/frontend + github actions + docker-compose
This pull request introduces Docker support for the project, including Dockerfiles, Docker Compose configurations, and updates to the documentation to reflect these changes. The goal is to streamline the setup process and provide an alternative to local installations by using containerized services.
Docker Support Implementation:
- GitHub Actions Workflow: Added a new workflow in
.github/workflows/docker-build.ymlto build and push Docker images for the backend and frontend to the GitHub Container Registry. This includes setting up Docker Buildx and caching layers for efficiency. - Backend Dockerfile: Created a
backend/Dockerfileto containerize the backend application using Python 3.11. It installs dependencies fromrequirements.txtand sets up the application to run on port 8000. - Frontend Dockerfile: Added a
frontend/Dockerfilefor the frontend application, based on Node.js 20. It installs dependencies and runs the application on port 3000.
Docker Compose Configurations:
- Pre-Built Images Configuration: Added
docker-compose.ghcr.yamlto use pre-built images from the GitHub Container Registry, including Redis, backend, and frontend services. It also defines environment variables and dependencies between services. - Local Build Configuration: Created
docker-compose.yamlto build images locally for the backend and frontend, with similar service definitions and dependencies.
Documentation Updates:
- Redis Setup Simplification: Updated the
README.mdto indicate that Redis is included in the Docker Compose setup, eliminating the need for separate installation. - Environment Configuration: Clarified environment variable usage for local development vs. Docker Compose, including examples for
NEXT_PUBLIC_BACKEND_URLand Redis configuration. [1] [2]
@korjavin is attempting to deploy a commit to the projects Team on Vercel.
A member of the Team first needs to authorize it.
Also just worked on this for backend! But is neat, will check out
We are planning to make it a “single-click”, with setup wizard loaded for all the API keys n stuff
- @adamcohenhillel has done this as well with https://github.com/kortix-ai/suna/pull/93
Have to check out & merge all 3
Hey @korjavin - thats awesome, thanks!
I am working on a version as well, but it is not yet fully working, where we also create the supabase instance locally.
The supabase creation and migrations works -> https://github.com/kortix-ai/suna/pull/93
would you like to integrate that into your PR? or should I continue finishing my stuff?
Looks good! The refactor makes the streaming logic much cleaner. Nice job separating concerns with StreamingServer. Just a small suggestion—it might help to add a short comment explaining the stop condition. Other than that, all tests pass and everything looks solid
Hi guys.
I am more than happy to help with #93 as well.
But I see, it's complicated now with 3-way merge.
Can we just merge this one, and then rebase #93 on the top of the main branch?
@korjavin I merged #93 - if you could make your stuff work with that, that would be great - don't worry about a third PR.
dockers:
- local backend
- local frontend
- local supabase + run migrations
- local redis
I have the local redis and the local supabase in the PR I merged, and if you could make your backend/frontend work with that, amazing
I resolved conflicts and rebased my code
Looks solid Ivan. Thanks Merged
Have to catchup with @adamcohenhillel re next steps for the self host