feat(portainer-automation): add deploy service

This commit is contained in:
Dave the Dev 2026-07-06 00:07:15 +00:00
parent 7942f47eb8
commit 1a6da256d2

View File

@ -0,0 +1,23 @@
package com.hithomelabs.portainer.service;
import com.hithomelabs.common.portainer.client.PortainerApiClient;
import com.hithomelabs.portainer.config.PortainerAutomationProperties;
import org.springframework.stereotype.Service;
@Service
public class DeployService {
private final PortainerApiClient portainerApiClient;
private final Long endpointId;
public DeployService(PortainerApiClient portainerApiClient,
PortainerAutomationProperties properties) {
this.portainerApiClient = portainerApiClient;
this.endpointId = properties.getEndpointId();
}
public void deploy(Long stackId) {
portainerApiClient.redeployGitStack(stackId, endpointId, true);
}
}