skyvern icon indicating copy to clipboard operation
skyvern copied to clipboard

adds devcontainer to facilitate local development

Open AlphaLawless opened this issue 8 months ago • 1 comments

Intro

Hello, this is a very small contribution, and it might not even be accepted. I don't know the development workflow of other Skyvern contributors, but I had quite a bit of difficulty trying to run the Skyvern environment locally on my machine. I'm not a Python developer, and I know that setting up its environment can be quite challenging. Also, I don't always work on the same machine, which made it even more difficult to manually configure everything. So here's my two cents for those who want an easier time contributing to the project.

Skyvern Development Environment Setup

This PR implements improvements to the Docker development environment for the Skyvern project, making the configuration more robust and the developer experience more seamless.

Key Changes:

  • Dockerfile Updates:
    • Added support for Python 3.11
    • Configured Poetry for dependency management
    • Installed Node.js via NVM for greater version flexibility
  • Docker Network Configuration:
    • Implemented dedicated network for container communication
    • Added dependency relationship between services
  • PostgreSQL Connection Fix:
    • Adjusted connection string to work properly in containerized environment
    • Configured database environment variables consistently
  • Support Scripts:
    • Added scripts for testing database connection
    • Simplified setup script for environment initialization

Benefits:

  • Significantly reduces setup time for new developers
  • Eliminates common PostgreSQL authentication errors
  • Provides a more stable and predictable development environment
  • Facilitates development across different operating systems

Image

imagem


[!IMPORTANT] Adds a Docker-based development environment setup for Skyvern, including environment configuration scripts and dependency management improvements.

  • Docker Setup:
    • Adds docker-compose.dev.yml for containerized development environment.
    • Configures Dockerfile in docker/dev for Python 3.11, Node.js via NVM, and Poetry.
    • Implements dedicated Docker network for service communication.
  • Environment Configuration:
    • Updates .env.example for consistent database connection strings.
    • Adds min_setup.sh script for initializing environment variables and dependencies.
    • Adjusts run_skyvern.sh and run_ui.sh to handle missing lsof command gracefully.
  • Miscellaneous:
    • Adds .bashrc in docker/dev for shell configuration and useful command aliases.
    • Simplifies PostgreSQL connection in .env.example and min_setup.sh.

This description was created by Ellipsis for a35f95fc52a0c4514ff0228973e235181b305a47. You can customize this summary. It will automatically update as commits are pushed.

AlphaLawless avatar May 17 '25 17:05 AlphaLawless

@jomido what do you think?

suchintan avatar May 19 '25 03:05 suchintan