Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure Gitpod for one-click quickstart #58

Merged
merged 12 commits into from
Apr 15, 2022
Merged

Conversation

jacobparis
Copy link
Contributor

@jacobparis jacobparis commented Apr 9, 2022

In this PR I've set up Gitpod with a custom Dockerfile that comes with Fly pre-installed. The goal is for people following the blog tutorial to not have to worry about setting up their local environment or installing Fly. In one click, they should be able to get into a code editor with the demo application running.

The first time a workspace is opened, a .env will be created automatically based on the .env.example. If the same workspace is closed and re-opened, local changes to this file will be persisted, but it will not be shared between workspaces.

If you do want to set a .env file and have it be the default for all new workspaces in this repo (useful if you're working on this repo itself or just often use it to start new projects with a similar config), the following command will serialize changes to the.env file to Gitpod's Workspace Environment Variables and future workspaces will load from that instead of the .env.example

eval $(gp env -e ENV="$(base64 .env | tr -d '\n')")

You can test this workflow by clicking this button:

Gitpod Ready-to-Code

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just a couple things.

.gitpod.yml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@jacobparis
Copy link
Contributor Author

I'd prefer to only include the plugins that are absolutely necessary

Agreed, and I've adjusted the list to your recommendation. I've got a good batch of extensions I like working with, and I figured it was easier to remove the ones we don't want than to come up with the ones we do

From @andrewbrey's comment remix-run/remix#2711

@jacobparis I just gave this a try against your repository branch, and noted the prisma dev migration is not done automatically at container init. That might be a nice thing to add to the setup script (like you're doing when you create the .env file for the user). If you did that, clicking "open in gitpod" would launch into a fully working and initialized dev environment, db and all 👍

This was a great suggestion, and that's been implemented now too. A new user can spin up a workspace and immediately create an account with no Prisma errors

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coolio 👍 Thanks for putting this together!

@kentcdodds kentcdodds merged commit e4c669c into remix-run:main Apr 15, 2022
@MichaelDeBoey
Copy link
Member

@jacobparis Would be lovely to have these in blues-stack & grunge-stack as well

@jacobparis
Copy link
Contributor Author

@jacobparis Would be lovely to have these in blues-stack & grunge-stack as well

I will make that happen :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants