Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
wip sites
Browse files Browse the repository at this point in the history
Signed-off-by: Jason McCallister <jason@craftcms.com>
  • Loading branch information
jasonmccallister committed Apr 6, 2020
1 parent e403e32 commit 41b40ef
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/site.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package config

type Site struct {
Domain string
Path string
PHP string
}
6 changes: 6 additions & 0 deletions internal/cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ var (
dbEngine := config.GetString("database.engine", flagDatabase)
dbVersion := config.GetString("database.version", flagDatabaseVersion)

if viper.IsSet("sites") {
var sites []config.Site
viper.UnmarshalKey("sites", &sites)
fmt.Println(sites)
}

if err := validate.DiskSize(disk); err != nil {
return err
}
Expand Down
6 changes: 6 additions & 0 deletions nitro.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ php: 7.3
database:
engine: mysql
version: 5.6
sites:
- domain: example
path: /Users/jasonmccallister/go/src/github.com/nitro/demo-site
php: 7.4
- domain: another
path: /Users/jasonmccallister/go/src/github.com/nitro/demo-site

0 comments on commit 41b40ef

Please # to comment.