Skip to content

Commit

Permalink
Add custom domain in configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
kiootic committed Nov 29, 2023
1 parent 9746b44 commit 89fe61c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/dev/pageship.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ name = "main"
[[app.sites]]
name = "dev"

[[app.domains]]
domain="example.com:8001"
site="dev"

[site]
public="public"

Expand Down
1 change: 1 addition & 0 deletions internal/config/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type AppConfig struct {
Sites []AppSiteConfig `json:"sites" pageship:"max=10,dive,required"`
Deployments AppDeploymentsConfig `json:"deployments"`
Team []*AccessRule `json:"team" pageship:"max=100,dive,required"`
Domains []AppDomainConfig `json:"domains" pageship:"max=10,unique=Domain,unique=Site,dive,required"`
}

func DefaultAppConfig() AppConfig {
Expand Down
6 changes: 6 additions & 0 deletions internal/config/app_domain.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package config

type AppDomainConfig struct {
Domain string `json:"domain" pageship:"required,max=200,hostname_port,lowercase"`
Site string `json:"site" pageship:"required,dnsLabel"`
}

0 comments on commit 89fe61c

Please sign in to comment.