Created
December 1, 2022 15:02
-
-
Save heysamtexas/fbc924185f8a354d81f589031d64280d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TAG:=$(shell date "+%Y%m%d%H%M") | |
HOST:=yourhost.com | |
IMAGE_NAME:=screenshots | |
############################################################################### | |
# HELP / DEFAULT COMMAND | |
############################################################################### | |
.PHONY: help | |
help: | |
@awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | |
.PHONY: build | |
build: ## Build the screenshots services | |
docker build -t $(IMAGE_NAME) -t $(IMAGE_NAME):$(TAG) . | |
.PHONY: build-prod | |
build-prod: ## Build the screenshots services remotely | |
docker -H ssh://$(HOST) build -t $(IMAGE_NAME) -t $(IMAGE_NAME):$(TAG) . | |
.PHONY: prod-deploy | |
prod-deploy: ## deploy to production | |
docker-compose -H ssh://$(HOST) up -d | |
.PHONY: prod-migrate | |
prod-migrate: ## run production migrations | |
docker-compose -H ssh://$(HOST) exec web ./manage.py migrate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment