Deploy Configuration
Once all dependencies have been installed, configure your deployment by declaring a Deploy block in your gothic.config.go file, as shown below. This is a real Go file - the CLI parses it statically, so your editor type-checks it as you write. Note there is no goModuleName field anymore: Gothic reads your module path straight from go.mod. The Deploy.Target selector picks the destination: gothic.AWS (the default when omitted), gothic.GCP, the Google Cloud Run engine, or gothic.Binary to build the self-hosted server binary. Each target reads its own block under Deploy.Providers, and pointing Target at a cloud with no declared block fails the config load. AWS settings live under Deploy.Providers.AWS:
package main
import gothic "github.com/gothicframework/core/config"
var Config = gothic.Config{
ProjectName: "gothic-example",
OptimizeImages: gothic.OptimizeImagesConfig{
LowResolutionRate: 20,
},
Deploy: &gothic.DeployConfig{
Target: gothic.AWS, // gothic.AWS | gothic.GCP | gothic.Binary
Providers: gothic.Providers{
AWS: gothic.AWSProvider{
ServerMemory: 512,
ServerTimeout: 30,
Region: "us-east-1",
Profile: "default",
Stages: map[string]gothic.Stage{
"dev": {
ENV: map[string]gothic.EnvValue{},
},
},
},
},
},
}On the Google Cloud target, set Target: gothic.GCP and declare the Cloud Run settings under Deploy.Providers.GCP; the GCP deploy guide shows the full block.
Now that you added the deploy configuration, let's go deeper into each functionality.