( cfg *model.ConfigConfig, subdomain string, cloudSubdomain string, cloudRegion string, cloudAdminSecret string, clouadPostgresURL string, httpPort uint, useTLS bool, nhostFolder string, ports ExposePorts, )
| 43 | } |
| 44 | |
| 45 | func consoleCloud( |
| 46 | cfg *model.ConfigConfig, |
| 47 | subdomain string, |
| 48 | cloudSubdomain string, |
| 49 | cloudRegion string, |
| 50 | cloudAdminSecret string, |
| 51 | clouadPostgresURL string, |
| 52 | httpPort uint, |
| 53 | useTLS bool, |
| 54 | nhostFolder string, |
| 55 | ports ExposePorts, |
| 56 | ) (*Service, error) { |
| 57 | console, err := console(cfg, subdomain, httpPort, useTLS, nhostFolder, ports.Console) |
| 58 | if err != nil { |
| 59 | return nil, err |
| 60 | } |
| 61 | |
| 62 | scheme := schemeHTTP |
| 63 | if useTLS { |
| 64 | scheme = schemeHTTPS |
| 65 | } |
| 66 | |
| 67 | cloudHasuraURL := clienv.NhostHasuraURL(cloudSubdomain, cloudRegion) |
| 68 | |
| 69 | console.DependsOn = nil |
| 70 | console.Command = []string{ |
| 71 | "bash", "-c", |
| 72 | fmt.Sprintf(` |
| 73 | hasura-cli \ |
| 74 | console \ |
| 75 | --no-browser \ |
| 76 | --endpoint %s \ |
| 77 | --address 0.0.0.0 \ |
| 78 | --console-port 9695 \ |
| 79 | --api-port %d \ |
| 80 | --api-host %s://%s.hasura.local.nhost.run \ |
| 81 | --console-hge-endpoint %s`, |
| 82 | cloudHasuraURL, httpPort, scheme, subdomain, cloudHasuraURL), |
| 83 | } |
| 84 | |
| 85 | console.Environment["HASURA_GRAPHQL_ADMIN_SECRET"] = cloudAdminSecret |
| 86 | console.Environment["HASURA_GRAPHQL_DATABASE_URL"] = clouadPostgresURL |
| 87 | |
| 88 | return console, nil |
| 89 | } |
| 90 | |
| 91 | func getServicesCloud( //nolint:funlen |
| 92 | cfg *model.ConfigConfig, |
no test coverage detected