loading...

Spin up a "local" instance of DEV in the cloud with GitPod (It's incredibly simple)

ben profile image Ben Halpern Updated on ใƒป2 min read

This PR came in over the weekend:

๐Ÿ”— Automated DEV setup using Gitpod

It allows you to spin up the dev.to codebase "locally" in your browser with the click of a button.

Within minutes, I was looking at a local instance of the application with all the expected dummy data:

Yes, that's a screenshot of my browser window.

It is everything we had hoped for. We had been trying to make the codebase friendly for this kind of setup for a while, and this is the culmination. In my estimation, complicated setup is the number one thing stopping people from pitching in when they want to contribute to open source.

The setup for our Rails app and all the dependencies can be a breeze if everything goes well, but if it doesn't go smoothly you'll find yourself in rbenv hell trying to get your versions right and wondering why these random C extensions won't install.

Running the app in Docker helps, but it's still a burden. Enter GitPod. Spinning up the app in such a simple way is the dream, and we have arrived.

There are still hiccups and gotchas, but the happy path right now is really smooth. At the moment, we still have some service dependencies like Algolia and our auth services GitHub and Twitter, which slow down the process of spinning up the app set up, depending what you are looking to do. But I hope we can get some of this stuff mocked and/or become vendor agnostic with some of the features we have.

To try this for yourself, go to our docs and find this button:

Follow the instructions on getting your keys set up, and then give the app time to set up and boot up (this could be faster in the future). And just like that, you'll be able to fiddle with the codebase. Pull requests are welcome!

Edit:

I didn't realize just how new GitPod was, but it looks like they made a launch post just today:

Cool stuff, thanks for being part of the community, GitPodders.

Posted on by:

ben profile

Ben Halpern

@ben

A Canadian software developer who thinks heโ€™s funny. He/Him.

Discussion

pic
Editor guide
 

So I actually took Gitpod out for a spin last night too! I was in the readme for dev.to and saw Gitpod and tried it out!

I was actually working on a different project at the time but was able to have a dev box in the cloud for my project in a matter of seconds! Allowed me to code for a few hours from my Chromebook last night without having to mess with anything locally!

I wasn't working on a webapp, but it's awesome to see that they have support for web apps and open ports as well!

 

I just tried it today on dev.to repo, and it's FREAKING AWESOME ๐Ÿ˜

 

Thanks again for the quick merge and really cool article! โค

There are still hiccups and gotchas, but the happy path right now is really smooth.

Could you please elaborate on the hiccups and gotchas? I'd love to help ironing them all out. ๐Ÿ˜Š

 

I mostly mean things that could be fixed on our end, but it might be possible to change something with GitPod. Basically when you setup our site, you automatically kick off a bunch of background jobs which you have to wait to finish before loading the site.

It seems like if you wait for everything to finish, it always works properly. If you try to skip steps, it gets confusing as to how itโ€™s working and why.

Everything seemed pretty small and to deal with it I just started over fresh, which was pretty awesome to be able to do.

There are still potential gotchas in getting up and running with our project that have nothing to do with GitPod. Iโ€™d love if we had no external service dependencies in development, but the process of adding Algolia keys on GitPod is a breeze.

So kudos all around!

 

Took gitpod out for a spin (with another repo) today and it was brilliant in one our of projects. Thanks for sharing! I think it might have taken 90s to get the project running which is super cool.

But now I'm having an issue setting up a project with a Dockerfile ... it starts out fine and recognizes the Dockerfile, it gets through all the steps and says it's successfully built the app (all steps are completed, and it shows Successfully built 298bdebb127f) .. but then it shows me this error

"Error: Error while adding Gitpod layer."
with no details at all on what went wrong. Has anyone run into this? :/

 

Hi Romina, thanks for the nice feeback!

"Error: Error while adding Gitpod layer."

And we should definitely improve here.

For now, if you want to share the repo/.gitpod.yaml + Dockerfile config, I can have a look it.

 

Thank you so much, this is very kind of you. Answered in spectrum :)

 

but if it doesn't go smoothly you'll find yourself in rbenv hell trying to get your versions right and wondering why these random C extensions won't install

me_irl

 
 

When I tried to run dev.to with Gitpod, i got this message :"The debug type is not recognized. Make sure that you have a corresponding debug extension installed and that it is enabled." What should I do? Please help.

 

This is pretty awsome. GitPod spun up and I just at this step:

โ— Dev.to requires free Algolia credentials.
โ— To get them, please follow docs.dev.to/backend/algolia/#get-a...

Add them to config/application.yml, save the file, and press any key to continue...

That link is dead so just on a search for the algolia API keys

 

Anything that can run in cloud; will eventually; run in the cloud โ˜๏ธ

 

Hey @ben I am using this approach to try to test my changes, but for some reason the default login credentials are not working for me. I am getting a cross origin error when submitting the login form. Any reason why you think this could be?

 

That's awesome!

Can we do it locally-locally as well, so we can use our own editor?

 

Can you expand on what you mean exactly?

 

Ah, so install the dependencies and everything in the cloud but edit files locally, not sure.

I know these folks are pretty excited about the web IDE part of it, so Iโ€™m not sure where they fall in this regard ๐Ÿ˜„

 

This is why I haven't pitched in. I saw the GitPod integration last night and didn't know what it did. Glad you explained as I'm going to spin this up tonight.

 

@ben does this come with default login for testing?

 

Please help, I tried to debug dev.to with gitpod but having the following problem:"The debug session type "chrome" is not supported." and could not run dev.to. Please help.