has anyone managed to successfully run a selfhosted gotrue instance?
i have cloned the gotrue repo, and added the following docker-compose.yml and env files, ran the migrations successfully (i think), but don’t get a response when trying http://localhost:8081/settings:
i have run docker-compose run --rm app gotrue migrate for the migrations, which seems to have worked. docker logs gotrue_app_1 does not show anything useful, even with log level debug.
when trying to reach http://localhost:8081/settings i get “Connection reset by peer”.
if i’m reading the docs correctly, the gotrue host is set with GOTRUE_API_HOST and PORT, while GOTRUE_SITE_URLshould point to the client application (which in my case runs on port 3000 locally).
The gotrue repo e.g. has these lines in example.env:
Ah I see. I forgot the GOTRUE_SITE_URL is just for emails and other callbacks, not for real-time API behavior.
Oddly enough, the code example in the docs shows them using the key GOTRUE_API_HOST while the actual doc paragraph for that variable reads as just API_HOST. Strange, but have you tried switching the ENV var key from GOTRUE_API_HOST to API_HOST?
Just popped open the GoTrue code again, and, while I haven’t run it myself to verify, you should be getting a log message similar to GoTrue API started on: localhost:8081 if the server began running correctly. Seems like there may be trouble in starting up if you’re not getting that message, but not seeing anything in STDOUT / STDERR is strange too
yeah the docs are a bit confusing - they state that “Environment variables are prefixed with GOTRUE_” except where explicitly stated otherwise (e.g. PORT) but the actual code examples don’t follow that rule.