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

Script for docker deploy commands #904

Draft
wants to merge 1 commit into
base: feature/distributed-demo
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
DEPLOY_DOCKER_DIR := ./deploy/docker
DEPLOY_GITLAB_DIR := ./deploy/services/gitlab

.PHONY: start-localhost stop-localhost
.PHONY: start-http stop-http
.PHONY: start-https stop-https
.PHONY: start-gitlab stop-gitlab

# Running the local gitlab instance (takes a few minutes)
start-gitlab:
cd $(DEPLOY_GITLAB_DIR) && \
docker compose up -d

stop-gitlab:
cd $(DEPLOY_GITLAB_DIR) && \
docker compose down

# Running the server on localhost
start-localhost:
docker compose -f $(DEPLOY_DOCKER_DIR)/compose.local.yml --env-file $(DEPLOY_DOCKER_DIR)/.env.local up -d

stop-localhost:
docker compose -f $(DEPLOY_DOCKER_DIR)/compose.local.yml --env-file $(DEPLOY_DOCKER_DIR)/.env.local down

# Running the server at http://<your-site>
start-http:
docker compose -f $(DEPLOY_DOCKER_DIR)/compose.server.yml --env-file $(DEPLOY_DOCKER_DIR)/.env.server up -d

stop-http:
docker compose -f $(DEPLOY_DOCKER_DIR)/compose.server.yml --env-file $(DEPLOY_DOCKER_DIR)/.env.server down

# Running the server at https://<your-site>
start-https:
docker compose -f $(DEPLOY_DOCKER_DIR)/compose.server.secure.yml --env-file $(DEPLOY_DOCKER_DIR)/.env.server up -d

stop-https:
docker compose -f $(DEPLOY_DOCKER_DIR)/compose.server.secure.yml --env-file $(DEPLOY_DOCKER_DIR)/.env.server down