encore icon indicating copy to clipboard operation
encore copied to clipboard

Using without docker?

Open sbdchd opened this issue 2 years ago • 1 comments

I'm going through the tutorial and got to the database section:

Before running your application, make sure you have Docker installed and running. It's required to locally run Encore applications with databases.

Is there a way to use a locally running PG instead?

I like to run PG locally rather than use docker because docker tends to be a resource hog on mac

sbdchd avatar Aug 05 '22 23:08 sbdchd

Hey @sbdchd, good question! The issue with supporting this is that running Postgres yourself typically assumes there's only one database cluster, whereas Encore provisions two separate database clusters (one for running your application and a separate one for running tests). Docker makes that really easy.

We have some unofficial support for this but it's primarily intended for running Encore tests in your own CI/CD pipelines, so you'll run into issues with it if you try to run both your application and tests. You can enable this by setting a couple of environment variables and then invoking encore daemon to restart the daemon: https://github.com/encoredev/encore/blob/main/cli/cmd/encore/daemon/daemon.go#L106-L117

eandre avatar Aug 08 '22 19:08 eandre