supertokens-core icon indicating copy to clipboard operation
supertokens-core copied to clipboard

Mysql-Docker on Heroku fails with `chown:: invalid user:'supertokens:supertokens'`

Open ambrt opened this issue 3 years ago • 3 comments

🐛 Bug Report

I cloned latest mysql repo and followed this https://devcenter.heroku.com/articles/container-registry-and-runtime instructions to deploy it to Heroku. But then when i try to run any command inside an app i get: chown: invalid user: 'supertokens:supertokens' (even for ls) Same is for auto start of the app itself.Log is below.

Useful informations

2022-01-03T14:55:09.605040+00:00 heroku[web.1]: State changed from crashed to starting

2022-01-03T14:55:13.865006+00:00 heroku[web.1]: Starting process with command supertokens start

2022-01-03T14:55:14.964476+00:00 app[web.1]: chown: invalid user: 'supertokens:supertokens'

2022-01-03T14:55:15.097222+00:00 heroku[web.1]: Process exited with status 1

2022-01-03T14:55:15.168437+00:00 heroku[web.1]: State changed from starting to crashed

ambrt avatar Jan 03 '22 15:01 ambrt

Hey! Based on the error above, it seems to be an issue with how your Heroku instance is configured (since even ls fails). Since this has nothing to do with SuperTokens, I am closing this issue. Instead, I have created this issue: https://github.com/supertokens/docs/issues/187 which we will close once we add the relevant docs.

In the meantime though, you can use our managed service to deploy an instance of SuperTokens automatically.

rishabhpoddar avatar Jan 04 '22 06:01 rishabhpoddar

I digged a little and found that chown in docker-entrypoint.sh is causing problems. I commented it out and added heroku port (required by heroku).

https://github.com/ambrt/supertokens-docker-mysql/blob/daf676974adcc14f95ff008efcb25b002374a349/docker-entrypoint.sh#L33-L40

It works now but I'm not sure if it will work later since heroku filesystem is ephemeral, so maybe chown will be needed.

ambrt avatar Jan 04 '22 07:01 ambrt

I'll reopen this issue since it is related to SuperTokens. We will fix the docker image to work on heroku.

rishabhpoddar avatar Jan 04 '22 07:01 rishabhpoddar

Closing this issue due to inactivity.

rishabhpoddar avatar Sep 11 '22 11:09 rishabhpoddar