Skip to content

Commit

Permalink
chore: remove public endpoint flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Sep 7, 2023
1 parent c16fb02 commit 30d3aca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ var Root = &cobra.Command{

var dev bool
var httpPort, metricsPort, devGuiPort int
var publicEndpoint = "http://localhost:8080"
var configDb, authMode, kratosAPI, kratosAdminAPI, postgrestURI string
var clerkJWKSURL, clerkOrgID string
var disablePostgrest bool
Expand All @@ -48,8 +47,7 @@ func ServerFlags(flags *pflag.FlagSet) {
flags.IntVar(&devGuiPort, "devGuiPort", 3004, "Port used by a local npm server in development mode")
flags.IntVar(&metricsPort, "metricsPort", 8081, "Port to expose a health dashboard ")
flags.BoolVar(&dev, "dev", false, "Run in development mode")
flags.StringVar(&publicEndpoint, "public-endpoint", "http://localhost:8080", "Public endpoint that this instance is exposed under")
flags.StringVar(&api.PublicWebURL, "public-web-url", "http://localhost:3000", "Public URL of the web application")
flags.StringVar(&api.PublicWebURL, "public-endpoint", "http://localhost:3000", "Public endpoint this instance is exposed under")
flags.StringVar(&api.ApmHubPath, "apm-hub", "http://apm-hub:8080", "APM Hub URL")
flags.StringVar(&configDb, "config-db", "http://config-db:8080", "Config DB URL")
flags.StringVar(&kratosAPI, "kratos-api", "http://kratos-public:80", "Kratos API service")
Expand Down
2 changes: 1 addition & 1 deletion cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ var Serve = &cobra.Command{
PreRun: PreRun,
Run: func(cmd *cobra.Command, args []string) {
// PostgREST needs to know how it is exposed to create the correct links
db.HttpEndpoint = publicEndpoint + "/db"
db.HttpEndpoint = api.PublicWebURL + "/db"
if authMode != "" {
db.PostgresDBAnonRole = "postgrest_api"
}
Expand Down

0 comments on commit 30d3aca

Please sign in to comment.