Understanding workspace images
When no image is referenced in the.gitpod.yml
workspaces use the workspace-full
image by default, which comes with many commonly used utilities. If you want to override the workspace image you can reference a built Docker image.
.gitpod.yml
.gitpod.yml
Installing Postgres
For our example we’ll use Postgres with the Gitpod PostgresQL workspace image. Copy the following line into your.gitpod.yml
file:
.gitpod.yml
5432
. Let’s add a port configuration to define and ignore that port in our .gitpod.yml
.
Again, copy the following lines into your .gitpod.yml
file:
.gitpod.yml
Database seeding
Finally, let’s automate the creation of our schema, and any necessary data seeding. For that, let’s add ourinit-db.sh
script to our .gitpod.yml
. Copy the following into the tasks
block that we created earlier:
.gitpod.yml