Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

asherAbecasiss
Copy link

merged upstream main into branch and resolved conflicts, integrate Docker Compose and Swarm into a unified package.

…ate Docker Compose and Swarm into a unified package.
@pmig pmig changed the title feat: merged upstream main into branch and resolved conflicts, integr… feat: docker swarm support Mar 24, 2025
@pmig pmig requested a review from kosmoz March 24, 2025 18:27
Copy link
Member

@kosmoz kosmoz left a 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(''),
Copy link
Member

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)
Copy link
Member

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"`
Copy link
Member

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 {
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants