You've already forked golang-saas-starter-kit
mirror of
https://github.com/raseels-repos/golang-saas-starter-kit.git
synced 2025-08-08 22:36:41 +02:00
updated devops package
This commit is contained in:
@ -357,7 +357,18 @@ Access/Secret Keys are required
|
||||
--no-cache skip caching for the docker build
|
||||
--no-push disable pushing release image to remote repository
|
||||
```
|
||||
|
||||
|
||||
* `deploy infrastructure` - Executes a deploy to setup the infrastructure for the deployment environment.
|
||||
|
||||
```bash
|
||||
$ cicd -env [dev|stage|prod] deploy infrastructure [command options]
|
||||
```
|
||||
|
||||
Options:
|
||||
```bash
|
||||
--dry-run print out the deploy details
|
||||
```
|
||||
|
||||
* `deploy service` - Executes a deploy for a single service
|
||||
|
||||
```bash
|
||||
@ -403,6 +414,11 @@ Access/Secret Keys are required
|
||||
|
||||
### Examples
|
||||
|
||||
Setup the infrastructure for _prod_
|
||||
```bash
|
||||
$ cicid --env=prod deploy infrastructure --dry-run=false
|
||||
```
|
||||
|
||||
Build the example service _web-app_
|
||||
```bash
|
||||
$ cicid --env=prod build service --name=web-app --release-tag=testv1 --dry-run=false
|
||||
|
@ -613,7 +613,6 @@ func gitRemoteUser(projectRoot string) string {
|
||||
return remoteUser
|
||||
}
|
||||
|
||||
|
||||
// DeployInfrastructureForTargetEnv executes the deploy commands for a target function.
|
||||
func DeployInfrastructureForTargetEnv(log *log.Logger, awsCredentials devdeploy.AwsCredentials, targetEnv Env, dryRun bool) error {
|
||||
|
||||
|
@ -204,7 +204,6 @@ func NewFunction(funcName string, cfg *devdeploy.Config) (*devdeploy.ProjectFunc
|
||||
return ctx, nil
|
||||
}
|
||||
|
||||
|
||||
// BuildFunctionForTargetEnv executes the build commands for a target function.
|
||||
func BuildFunctionForTargetEnv(log *log.Logger, awsCredentials devdeploy.AwsCredentials, targetEnv Env, functionName, releaseTag string, dryRun, noCache, noPush bool) error {
|
||||
|
||||
|
@ -45,7 +45,7 @@ type ServiceContext struct {
|
||||
EnableHTTPS bool `validate:"omitempty" example:"false"`
|
||||
EnableElb bool `validate:"omitempty" example:"false"`
|
||||
StaticFilesS3Enable bool `validate:"omitempty" example:"false"`
|
||||
DockerBuildDir string `validate:"omitempty"`
|
||||
DockerBuildDir string `validate:"omitempty"`
|
||||
DockerBuildContext string `validate:"omitempty" example:"."`
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ func (c ServiceContext) BaseUrl() string {
|
||||
// NewService returns the ProjectService for a service that is configured for the target deployment env.
|
||||
func NewService(serviceName string, cfg *devdeploy.Config) (*devdeploy.ProjectService, error) {
|
||||
|
||||
ctx, err := NewServiceContext(serviceName, cfg)
|
||||
ctx, err := NewServiceContext(serviceName, cfg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -147,11 +147,11 @@ func NewService(serviceName string, cfg *devdeploy.Config) (*devdeploy.ProjectSe
|
||||
CodeDir: filepath.Join(cfg.ProjectRoot, "cmd", serviceName),
|
||||
DockerBuildDir: ctx.DockerBuildDir,
|
||||
DockerBuildContext: ".",
|
||||
EnableHTTPS: ctx.EnableHTTPS,
|
||||
EnableHTTPS: ctx.EnableHTTPS,
|
||||
|
||||
ServiceHostPrimary: ctx.ServiceHostPrimary,
|
||||
ServiceHostNames: ctx.ServiceHostNames,
|
||||
ReleaseTag: ctx.ReleaseTag,
|
||||
ServiceHostNames: ctx.ServiceHostNames,
|
||||
ReleaseTag: ctx.ReleaseTag,
|
||||
}
|
||||
|
||||
if srv.DockerBuildDir == "" {
|
||||
@ -362,7 +362,7 @@ func NewService(serviceName string, cfg *devdeploy.Config) (*devdeploy.ProjectSe
|
||||
},
|
||||
Cpu: aws.Int64(128),
|
||||
MemoryReservation: aws.Int64(128),
|
||||
Environment: baseEnvVals(cfg, srv),
|
||||
Environment: baseEnvVals(),
|
||||
HealthCheck: &ecs.HealthCheck{
|
||||
Retries: aws.Int64(3),
|
||||
Command: aws.StringSlice([]string{
|
||||
@ -488,7 +488,7 @@ func NewService(serviceName string, cfg *devdeploy.Config) (*devdeploy.ProjectSe
|
||||
},
|
||||
Cpu: aws.Int64(128),
|
||||
MemoryReservation: aws.Int64(128),
|
||||
Environment: baseEnvVals(cfg, srv),
|
||||
Environment: baseEnvVals(),
|
||||
HealthCheck: &ecs.HealthCheck{
|
||||
Retries: aws.Int64(3),
|
||||
Command: aws.StringSlice([]string{
|
||||
|
Reference in New Issue
Block a user