-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (35 loc) · 1.04 KB
/
Makefile
File metadata and controls
42 lines (35 loc) · 1.04 KB
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
32
33
34
35
36
37
38
39
40
41
42
language := ruby
help:
@echo "Usage: make COMMAND [OPTIONS]"
@echo
@echo "Options:"
@echo " language=[language] - The language can be any of the supported languages such as: node, ruby or python."
@echo
@echo "Commands:"
@echo " start\t\tStart the containers (and builds them if they don't exist)."
@echo " build\t\tBuild the Docker images."
@echo " destroy\tDestroy the containers."
@echo " stop\t\tStop the containers."
@echo " restart\tRestart the containers."
@echo " logs\t\tShow container logs."
.PHONY: help
start: ## Start the containers
@REACT_APP_BACKEND_HOST=http://$(language):5000 \
docker-compose up --remove-orphans --detach $(language) frontend
.PHONY: start
build: ## Build the containers
docker-compose build --no-cache
.PHONY: build
destroy: ## Destroy the containers
@docker-compose down
.PHONY: destroy
stop: ## Stop the containers
@docker-compose stop
.PHONY: stop
restart: ## Restart the containers
@make -s destroy
@make -s start
.PHONY: restart
logs: ## Show containers logs
@docker-compose logs
.PHONY: logs