2021-07-15 23:47:35 +00:00
|
|
|
COMPOSE_PROJECT_NAME?=oliverdavies-uk
|
2021-07-16 11:49:42 +00:00
|
|
|
DOCKER_WEB_IMAGE_NAME:=ghcr.io/opdavies/$(COMPOSE_PROJECT_NAME)-web
|
2021-07-15 23:47:35 +00:00
|
|
|
|
|
|
|
assets-watch:
|
|
|
|
npm ci
|
|
|
|
npm run watch
|
|
|
|
|
|
|
|
build-images:
|
2021-07-16 11:09:40 +00:00
|
|
|
docker image build . \
|
2021-07-15 23:47:35 +00:00
|
|
|
--file tools/docker/images/Dockerfile \
|
2021-07-16 11:49:42 +00:00
|
|
|
--tag $(DOCKER_WEB_IMAGE_NAME):$(DOCKER_TAG) \
|
|
|
|
--tag $(DOCKER_WEB_IMAGE_NAME):latest \
|
2021-07-16 11:09:40 +00:00
|
|
|
--target=production
|
2021-07-15 23:47:35 +00:00
|
|
|
|
|
|
|
deploy:
|
|
|
|
cd tools/deployment && ansible-playbook deploy.yml
|
|
|
|
|
2021-07-16 11:09:40 +00:00
|
|
|
destroy:
|
|
|
|
COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) docker-compose down --volumes --remove-orphans
|
|
|
|
|
2021-07-15 23:47:35 +00:00
|
|
|
disable:
|
2021-07-27 08:00:00 +00:00
|
|
|
COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) docker-compose down --remove-orphans
|
2021-07-15 23:47:35 +00:00
|
|
|
|
|
|
|
enable:
|
2021-07-27 08:00:00 +00:00
|
|
|
COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) docker-compose up --detach --build --remove-orphans
|
2021-07-15 23:47:35 +00:00
|
|
|
|
|
|
|
ps:
|
|
|
|
COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) docker-compose ps
|
|
|
|
|
|
|
|
push-images:
|
2021-07-16 11:49:42 +00:00
|
|
|
docker image push $(DOCKER_WEB_IMAGE_NAME):$(DOCKER_TAG)
|
|
|
|
docker image push $(DOCKER_WEB_IMAGE_NAME):latest
|
2021-07-15 23:47:35 +00:00
|
|
|
|
2021-08-02 18:24:05 +00:00
|
|
|
run-production:
|
|
|
|
docker-compose --file docker-compose-production.yaml up --detach --remove-orphans
|
|
|
|
|
2021-07-15 23:47:35 +00:00
|
|
|
.PHONY: *
|
|
|
|
|
|
|
|
# vim: noexpandtab filetype=make
|