-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
42 lines (35 loc) · 1.06 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
IMAGE = asix-final-frontend
DOCKER = docker-compose
MACHINE = asix-final-frontend
# FRONTMACHINE = eu.gcr.io/noted-feat-168716/asixfinalprojectfrontend_node-server_1
FRONTMACHINE = 727924676995.dkr.ecr.eu-west-2.amazonaws.com
help:
@echo ""
@echo "usage:"
@echo ""
@echo "* make run: runs the frontend in development mode (deattached)"
@echo "* make stop: stops the docker machine"
@echo "* make build: builds the docker image"
@echo ""
build:
@echo "Building machine...please, wait...";
@docker build -t $(IMAGE) .
@echo "Done! ✅";
run:
@echo "Servering frontend...";
@$(DOCKER) up -d;
@echo "Done! ✅";
stop:
@echo "Stopping frontend! 🍺";
@$(DOCKER) down;
@echo "Done! ✅";
awslogin:
@echo "Loggin in aws...";
@`aws ecr get-login --no-include-email --region eu-west-2`;
@echo "Done!";
deploy-production:
@echo "Deploying frontend... (production)";
@docker build -t $(MACHINE):latest .
@docker tag $(MACHINE):latest $(FRONTMACHINE)/$(MACHINE):latest;
@docker push $(FRONTMACHINE)/$(MACHINE):latest;
@echo "Done!";