nicbet / docker-phoenix

A dockerized Phoenix development and runtime environment.
GNU General Public License v3.0
277 stars 57 forks source link

Enable gitpod integration #28

Closed restlessronin closed 2 years ago

restlessronin commented 2 years ago

Hi @nicbet ,

I recently did a gitpod integration for a phoenix project I'm working on, and wanted to make it public. Rather than create a separate project which is very similar to this one, I thought it would be better to contribute it here. The project would then conceptually have integrations with various "dev container" implementations (like the VS Code integration).

I've simplified the integration so that it will work with the existing project structure and docker-compose files.

I hope it makes sense for you to add it.

nicbet commented 2 years ago

Very cool, just tried it out from your fork.

However, I can't save a file from the IDE image

Does the .gitpod.yml or Dockerfile need any changes to user or user permissions to work with Gitpod?

restlessronin commented 2 years ago

I don't believe the .gitpod.yml or the Dockerfile have anything to do with the permissions for saving. I think there's some kind of credential exchange handshake between gitpod and github that enables the saving. Let me take a look at it from my end.

restlessronin commented 2 years ago

You have to install the Gitpod.io app in github with the correct permissions.

https://github.com/apps/gitpod-io

restlessronin commented 2 years ago

I got this error message when I tried to save a file to the docker-phoenix repo

> git push origin enable-gitpod:enable-gitpod
remote: error: GH007: Your push would publish a private email address.        
remote: You can make your email public or disable this protection by visiting:        
remote: http://github.com/settings/emails        
To https://github.com/restlessronin/docker-phoenix.git
 ! [remote rejected] enable-gitpod -> enable-gitpod (push declined due to email privacy restrictions)
error: failed to push some refs to 'https://github.com/restlessronin/docker-phoenix.git'

I know github has some privacy feature where committer emails are not visible publicly and are proxied through a github generated alias. That may be an additional issue here.

restlessronin commented 2 years ago

Is there anything else that should be addressed in this PR?