Persisting data between workspaces for a repo?

I have a project using Docker compose where one of the services is a PostgreSQL server. I’m investigating using a Gitpod development environment, but I have one problem.

The data in the server is stored in a Docker volume which I intentionally do not recreate every time I work the project (I load in a lot of dummy data, so it takes a long time to recreate). To continue development on Gitpod the same way I currently do I would need to be able to create a volume that persists for a particular repository.

Is this possible? If not, what is the recommended solution?

The way I do it is I spin up a new database in Docker for every new workspace. I then seed it with any data I need in the database during development. This helps me start with a fresh database for every workspace.

This is all automated in the startup script.

1 Like