suna icon indicating copy to clipboard operation
suna copied to clipboard

Dockerfiles for backend/frontend + github actions + docker-compose

Open korjavin opened this issue 8 months ago • 5 comments

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.yml to 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/Dockerfile to containerize the backend application using Python 3.11. It installs dependencies from requirements.txt and sets up the application to run on port 8000.
  • Frontend Dockerfile: Added a frontend/Dockerfile for 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.yaml to 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.yaml to build images locally for the backend and frontend, with similar service definitions and dependencies.

Documentation Updates:

  • Redis Setup Simplification: Updated the README.md to 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_URL and Redis configuration. [1] [2]

korjavin avatar Apr 24 '25 21:04 korjavin

@korjavin is attempting to deploy a commit to the projects Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Apr 24 '25 21:04 vercel[bot]

Also just worked on this for backend! But is neat, will check out

markokraemer avatar Apr 24 '25 22:04 markokraemer

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

markokraemer avatar Apr 24 '25 22:04 markokraemer

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?

adamcohenhillel avatar Apr 25 '25 00:04 adamcohenhillel

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

QuantumAlchemist03 avatar Apr 25 '25 08:04 QuantumAlchemist03

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 avatar Apr 25 '25 15:04 korjavin

@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

adamcohenhillel avatar Apr 25 '25 17:04 adamcohenhillel

I resolved conflicts and rebased my code

korjavin avatar Apr 25 '25 21:04 korjavin

Looks solid Ivan. Thanks Merged

Have to catchup with @adamcohenhillel re next steps for the self host

markokraemer avatar Apr 25 '25 23:04 markokraemer