aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: fabe76362c70dd4fe6941d02dcc226417421d370 (plain)
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
.PHONY: build

SHELL := /bin/bash
CONTAINERNAME=accli
IMAGENAME=accli

help:
	@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

build: ## Build the Docker image
	cp -r requirements.txt ./docker
	cp -r config.json ./docker
	docker build -t $(IMAGENAME) ./docker

up: build ## Bring the Docker container up
	docker run -td -v $(PWD):/opt --name $(CONTAINERNAME) $(IMAGENAME) || echo 'Already up!'

down: ## Stop the Docker container
	docker stop $(CONTAINERNAME)

enter: ## Enter the running Docker container
	docker exec -it $(CONTAINERNAME) /bin/bash

clean: down ## Stop and remove Docker container
	docker rm $(CONTAINERNAME)