Skip to content
Merged
14 changes: 6 additions & 8 deletions services/portainer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,38 @@ include ${REPO_BASE_DIR}/scripts/common.Makefile
.PHONY: up ## Deploys portainer stack
up: .init .env secrets ${TEMP_COMPOSE}
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE} ${STACK_NAME}
@$(MAKE) --noprint configure-portainer-registry
@$(MAKE) --no-print-directory configure-portainer-registry

.PHONY: up-local ## Deploys portainer stack for local deployment
up-local: .init .env secrets ${TEMP_COMPOSE} ${TEMP_COMPOSE}-local
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE}-local ${STACK_NAME}
@$(MAKE) --noprint configure-portainer-registry
@$(MAKE) --no-print-directory configure-portainer-registry

.PHONY: up-dalco ## Deploys portainer stack for Dalco Cluster
up-dalco: .init .env secrets ${TEMP_COMPOSE}-dalco
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE}-dalco ${STACK_NAME}
@$(MAKE) --noprint configure-portainer-registry
@$(MAKE) --no-print-directory configure-portainer-registry

.PHONY: up-aws ## Deploys portainer stack for AWS
up-aws: .init .env secrets ${TEMP_COMPOSE}-aws
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE}-aws ${STACK_NAME}
@$(MAKE) --noprint configure-portainer-registry
@$(MAKE) --no-print-directory configure-portainer-registry

.PHONY: up-public ## Deploys portainer stack for public access Cluster
up-public: up-dalco

.PHONY: up-master ## Deploys portainer stack for master Cluster
up-master: .init .env secrets ${TEMP_COMPOSE}-master
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE}-master ${STACK_NAME}
@$(MAKE) --noprint configure-portainer-registry

@$(MAKE) --no-print-directory configure-portainer-registry

.PHONY: configure-portainer-registry
configure-portainer-registry: venv $(VENV_BIN)/python $(WAIT_FOR_IT) ## Add registry to Portainer
@$(MAKE) --no-print install REQUIREMENTS_FILE=./scripts/requirements.txt
@$(MAKE) --no-print-directory install REQUIREMENTS_FILE=./scripts/requirements.txt
@set -o allexport; source $(REPO_CONFIG_LOCATION); set +o allexport; \
$(WAIT_FOR_IT) http $$PORTAINER_URL --timeout=120s --interval=5s --expect-status-code 200 && \
$(VENV_BIN)/python ./scripts/configure_portainer_registry.py


# Helpers -------------------------------------------------

.PHONY: ${TEMP_COMPOSE}
Expand Down
Loading