this post was submitted on 05 Sep 2023
47 points (94.3% liked)

Programming

17313 readers
412 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS
 

In a lot of projects, this is usually done via README. It tells you what running dependencies to install and how to run certain commands.

This can get harder to maintain as things change, the project grows, and complexity increases.

I see two parts to automate here: actually setting up the environment, and running the application or orchestrating multiple apps.

How do you address this?

you are viewing a single comment's thread
view the rest of the comments
[–] abhibeckert 9 points 1 year ago* (last edited 1 year ago)

I use "Dev Containers" in Visual Studio Code.

  • Step 1 - open the root directory of your project in Visual Studio Code
  • Step 2 - say yes when prompted to launch the dev container
  • Step 3 - there is no Step 3.

You do need to create various config files/etc, but it's pretty straight forward and only needs to be done once for each project. Those config files are all kept in version control.

The dev container setup generally matches the production system pretty closely. Depending on the project that ranges from dead simple to exceedingly complex with several servers all of which are built, configured and launched automatically when you open the project. If you need to change a container you just edit the config file and run a command to rebuild all of them. It's surprisingly fast - thanks to caching at every step to avoid rebuilding the entire environment.