-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
31 lines (22 loc) · 953 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.PHONY: build
SHELL := /bin/bash
CONTAINERNAME_BACKEND=wagtail_vue_backend
IMAGENAME_BACKEND=wagtail_vue:backend
CONTAINERNAME_FRONTEND=wagtail_vue_frontend
IMAGENAME_FRONTEND=wagtail_vue:frontend
build: ## Build the Docker images
docker-compose -p wagtail_vue build
up: build ## Bring the Docker containers up
docker-compose -p wagtail_vue up -d || echo 'Already up!'
upwin: ## Bring the Docker container up for bash on ubuntu folk
export WINDIR="$(subst /mnt/c,//c,$(CURDIR))/" && make up
lint: build ## Lint the python code.
docker run -v $(CURDIR)/django:/app $(IMAGENAME_BACKEND) /bin/bash -c 'flake8 website'
down: ## Stop the backend Docker container
docker-compose -p wagtail_vue stop
enter: ## Enter backend container
docker exec -it $(CONTAINERNAME_BACKEND) /bin/bash
enter_fe: ## Enter frontend container
docker exec -it $(CONTAINERNAME_FRONTEND) /bin/sh
clean: ## Stop and remove all Docker containers
docker-compose down