Skip to content

can't get initialization to work #456

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

Closed
catmando opened this issue Apr 8, 2019 · 5 comments
Closed

can't get initialization to work #456

catmando opened this issue Apr 8, 2019 · 5 comments

Comments

@catmando
Copy link

catmando commented Apr 8, 2019

I have the following .gitpod.yml file.

It doesn't seem to do anything:

tasks:
  - init:
      bundle install && 
      yarn &&
      bundle exec rake db:reset
  - command:
      bundle exec foreman start
ports:
  - port: 5000
  - port: 3000
  - port: 9514
  - port: 9515
  - port: 25222

the repo is here: https://github.com/hyperstack-org/todo-compare/tree/gitpod

thanks in advance

@svenefftinge
Copy link
Member

svenefftinge commented Apr 8, 2019

You are creating two terminals here, I guess what you want is the following:

tasks:
  - init:
      bundle install && 
      yarn &&
      bundle exec rake db:reset
    command:
      bundle exec foreman start
ports:
  - port: 5000
  - port: 3000
  - port: 9514
  - port: 9515
  - port: 25222

I.e. every list item below tasks creates one terminal. Also, unfortunately, the different lifecycles are not properly synched across terminals. That is the second terminal doesn't wait for the init phase in the first one to complete before starting the commandphase. That's something we definitely want to fix though.

Also note, that for the ports you can specify what action to take when they open.
See https://www.gitpod.io/docs/43_Config_Ports/#configure-the-opening-behavior

@joshleblanc
Copy link

To expand on sven's answer, the dash before the task indicates a new terminal.

@jankeromnes
Copy link
Contributor

Also unfortunately I think that .gitpod.yml files on non-default branches (i.e. not on master) are not yet supported. I remember being bitten by that, so I usually experiment with .gitpod.yml on master in personal forks.

@32leaves or @geropl do you confirm?

@geropl
Copy link
Member

geropl commented Apr 9, 2019

@jankeromnes No, it works. You have to make sure to use the branch url (<repo>/tree/<branch>, though)

I enhanced the setup here.

@catmando
Copy link
Author

catmando commented Apr 9, 2019

All very cool... works great thanks a lot!

@catmando catmando closed this as completed Apr 9, 2019
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

No branches or pull requests

5 participants