Multi-Stage Deployments
Declare different stages with different variables under Deploy.Providers.AWS.Stages in your gothic.config.go. Each stage has its own ENV map, and can optionally set its own CustomDomain, HostedZoneId, CertificateArn or WafArn.
Stages: map[string]gothic.Stage{
"dev": {
ENV: map[string]gothic.EnvValue{
"MyEnvVar1": gothic.Env("dev-value"),
},
},
"qa": {
ENV: map[string]gothic.EnvValue{
"MyEnvVar1": gothic.Env("qa-value"),
},
},
"prod": {
ENV: map[string]gothic.EnvValue{
"MyEnvVar1": gothic.Env("prod-value"),
},
},
},After that you can deploy the same app in different stages with a simple command (this wraps gothic deploy --action deploy --stage):
make deploy STAGE=yourCustomStageWant to fine-tune how the CDN caches your pages? Let's look at CDN caching next!
