diff options
Diffstat (limited to 'cmd/ship/deploy_v2.go')
| -rw-r--r-- | cmd/ship/deploy_v2.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cmd/ship/deploy_v2.go b/cmd/ship/deploy_v2.go index af4e3a7..b636709 100644 --- a/cmd/ship/deploy_v2.go +++ b/cmd/ship/deploy_v2.go | |||
| @@ -67,8 +67,13 @@ func deployV2(path string, opts deployV2Options) { | |||
| 67 | name = generateName() | 67 | name = generateName() |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | // Build URL | 70 | // Build URL: use custom domain if provided, otherwise use subdomain |
| 71 | url := fmt.Sprintf("https://%s.%s", name, hostConfig.BaseDomain) | 71 | var url string |
| 72 | if opts.Domain != "" { | ||
| 73 | url = fmt.Sprintf("https://%s", opts.Domain) | ||
| 74 | } else { | ||
| 75 | url = fmt.Sprintf("https://%s.%s", name, hostConfig.BaseDomain) | ||
| 76 | } | ||
| 72 | 77 | ||
| 73 | // Build deploy context | 78 | // Build deploy context |
| 74 | ctx := &deployContext{ | 79 | ctx := &deployContext{ |
| @@ -140,6 +145,7 @@ func deployV2(path string, opts deployV2Options) { | |||
| 140 | type deployV2Options struct { | 145 | type deployV2Options struct { |
| 141 | Name string | 146 | Name string |
| 142 | Host string | 147 | Host string |
| 148 | Domain string | ||
| 143 | Health string | 149 | Health string |
| 144 | TTL string | 150 | TTL string |
| 145 | Env []string | 151 | Env []string |
