Val
12/07/2022, 10:30 AMrp
12/07/2022, 10:31 AMVal
12/07/2022, 10:31 AMgolang
func Run(conf config.Supertokens) error {
apiBasePath := "/auth"
websiteBasePath := "/auth"
return supertokens.Init(supertokens.TypeInput{
Supertokens: &supertokens.ConnectionInfo{
ConnectionURI: conf.Host,
/*APIKey: conf.APIKey,*/
},
AppInfo: supertokens.AppInfo{
AppName: conf.AppName,
APIDomain: conf.APIDomain,
WebsiteDomain: conf.WebAppDomain,
APIBasePath: &apiBasePath,
WebsiteBasePath: &websiteBasePath,
},
RecipeList: []supertokens.Recipe{
dashboard.Init(dashboardmodels.TypeInput{
ApiKey: "Mypassword12345",
}),
emailpassword.Init(nil),
session.Init(nil),
},
})
}
rp
12/07/2022, 10:32 AMconf.Host
?Val
12/07/2022, 10:32 AMrp
12/07/2022, 10:33 AMVal
12/07/2022, 10:35 AMConnectionInfo
and dashboard.Init
should be the same? I try bothyaml
supertokens:
image: registry.supertokens.io/supertokens/supertokens-postgresql:4.2
depends_on:
- postgres
ports:
- "${SUPERTOKENS_PORT}:3567"
environment:
POSTGRESQL_USER: ${DB_USERNAME}
POSTGRESQL_HOST: ${DB_HOST}
POSTGRESQL_PASSWORD: ${DB_PWD}
restart: unless-stopped
networks:
- postgres-net
healthcheck:
test: >
bash -c 'exec 3<>/dev/tcp/127.0.0.1/3567 && echo -e "GET /hello HTTP/1.1\r\nhost: 127.0.0.1:3567\r\nConnection: close\r\n\r\n" >&3 && cat <&3 | grep "Hello"'
interval: 10s
timeout: 5s
retries: 5
rp
12/07/2022, 10:37 AMhttp://supertokens:3567
Val
12/07/2022, 10:38 AMrp
12/07/2022, 10:38 AMVal
12/07/2022, 10:44 AMConnectionURI: fmt.Sprintf("http://localhost:%d", conf.Port),
And
ConnectionURI: fmt.Sprintf("http://%s:%d", conf.Host, conf.Port),
Where conf.Host is equal to superTokens container name/users
rp
12/07/2022, 10:46 AMpostgres-net
network to your golang service config?Val
12/07/2022, 10:47 AMrp
12/07/2022, 10:47 AMVal
12/07/2022, 10:48 AMrp
12/07/2022, 10:48 AMVal
12/07/2022, 10:49 AMsattvikc
12/07/2022, 10:49 AMrp
12/07/2022, 10:50 AMVal
12/07/2022, 10:50 AMrp
12/07/2022, 10:51 AMVal
12/07/2022, 10:52 AMsattvikc
12/07/2022, 10:57 AMVal
12/07/2022, 10:58 AMsattvikc
12/07/2022, 10:59 AMVal
12/07/2022, 11:01 AMrp
12/07/2022, 1:16 PMVal
12/07/2022, 1:23 PMrp
12/07/2022, 1:48 PMVal
12/07/2022, 2:11 PMregistry.supertokens.io/supertokens/supertokens-postgresql:4.2
rp
12/07/2022, 2:32 PMVal
12/07/2022, 2:35 PMrp
12/07/2022, 2:45 PM