-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (35 loc) · 1.28 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
include docker.env
export $(shell sed 's/=.*//' docker.env)
export PROJECT_NAME := $(or $(PROJECT_NAME), learn_docker_nest)
export POSTGRES_PORT := $(or $(POSTGRES_PORT), 5432)
export POSTGRES_HOST := $(or $(POSTGRES_HOST), db)
export POSTGRES_DATABASE := $(or $(POSTGRES_DATABASE), test_db)
export POSTGRES_USER := $(or $(POSTGRES_USER), test_db)
export POSTGRES_PASSWORD := $(or $(POSTGRES_PASSWORD), rootroot)
local:
@echo "+\n++ Make: Run/Build locally ...\n+"
@docker-compose up --build
run-local:
@echo "+\n++ Make: Running locally ...\n+"
@docker-compose -f docker-compose.yml up
run-local-db:
@echo "+\n++ Make: Running locally ...\n+"
@docker-compose -f docker-compose.yml up db
run-local-server:
@echo "+\n++ Make: Running locally ...\n+"
@docker-compose -f docker-compose.yml up api
close-local:
@docker-compose down
run-local-client:
@echo "+\n++ Make: Running locally ...\n+"
@docker-compose -f docker-compose.yml up client
run-local-db:
@echo "+\n++ Make: Running locally ...\n+"
@docker-compose -f docker-compose.yml up db
run-local-api:
@echo "+\n++ Make: Running locally ...\n+"
@docker-compose -f docker-compose.yml up api
make local-server-workspace:
@docker exec -it $(PROJECT_NAME)-api sh
make local-db-workspace:
@docker exec -it $(PROJECT_NAME)-db sh