-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: docker swarm support #645
base: main
Are you sure you want to change the base?
feat: docker swarm support #645
Conversation
…ate Docker Compose and Swarm into a unified package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @asherAbecasiss! At first glance this looks promising.
The one thing I'm not sure about having the DockerType
on the application version entity. That is because, as far as I understand (please correct me if I'm wrong), docker compose
and docker stack
are both built on the same file specification, where both ignore some parts that are not relevant. I think it might make more sense to have the DockerType
on the deployment target entity, that way a vendor only has to create an application once and the customer can decide which type to use later. What do you think, would that work?
validators: Validators.required, | ||
}), | ||
compose: new FormControl(''), | ||
swarm: new FormControl(''), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this field is unused
@@ -210,14 +210,20 @@ func GetApplicationForApplicationVersionID(ctx context.Context, id, orgID uuid.U | |||
} | |||
|
|||
func CreateApplicationVersion(ctx context.Context, applicationVersion *types.ApplicationVersion) error { | |||
// defaultDockerType := DockerTypeCompose | |||
// av.Docker_Type = &defaultDockerType | |||
fmt.Println("----------------->>>>>>>>>>>>", applicationVersion.Docker_Type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should probably be removed
ArchivedAt *time.Time `db:"archived_at" json:"archivedAt,omitempty"` | ||
Name string `db:"name" json:"name"` | ||
ApplicationID uuid.UUID `db:"application_id" json:"applicationId"` | ||
Docker_Type *DockerType `db:"docker_type" json:"dockerType,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename to DockerType
return errors.New("missing compose file") | ||
if av.Docker_Type == nil || *av.Docker_Type == "" { | ||
return errors.New("missing docker type") | ||
} else if *av.Docker_Type == DockerTypeCompose && av.ComposeFileData == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't a "swarm" application also require a compose file?
merged upstream main into branch and resolved conflicts, integrate Docker Compose and Swarm into a unified package.