We’re looking at moving our team to GitPod, and I’m working with projects of increasing complexity.
I’ve got some Sphinx-based documentation projects working, and the team are pleased with the results. Now I’m trying a Rails app.
What I would like to have happen is bundle install
runs, and then the various tasks run in their own windows.
I’m stuck and I think read everything and also most of the examples I can find.
This is what I have so far, which works except the command:
lines start up before the init:
has completed, so they mostly fail as Rails isn’t installed yet.
tasks:
- init: >
bundle install &&
yarn install --check-files &&
rails db:setup
- name: Rails
command: rails server
- name: Webpack
command: bin/webpack-dev-server
- name: Redis
command: redis-server
- name: Sidekiq
command: sidekiq
My questions:
- How can I ensure init completes before anything else?
- I’ve seen
>
and|
used in this file. What do those characters do and what’s the best practice? - I’ve also seen commands concatenated with
&&
and sometimes not. I’m not sure I understand why and think it might be something to do with>
and|
?
Many thanks for any help. We’re really enthused with GitPod so far, just a few little tweaks…
Simon