forked from NexClipper/exporterhub.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (30 loc) · 1.09 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
docker_version="latest"
front_tag="release-fe0.3.17-6"
api_tag="release-api0.3.17-6"
hello:
#
# You can use - build / build-fe / build-be / set / run / start / push / all
#
set:
sed -i "s/^front_tag=.*/front_tag=\"${front_tag}\"/" .env
sed -i "s/^api_tag=.*/api_tag=\"${api_tag}\"/" .env
build-fe:
sudo docker build -t nexclipper/exporterhub:${front_tag} ./ --no-cache
sudo docker tag nexclipper/exporterhub:${front_tag} nexclipper/exporterhub:${docker_version}
build-be:
cd api && sudo docker build -t nexclipper/exporterhub-api:${api_tag} ./ --no-cache && cd ..
sudo docker tag nexclipper/exporterhub-api:${api_tag} nexclipper/exporterhub-api:${docker_version}
build: build-fe build-be
run: set
sudo docker-compose up
login:
sudo docker login
push: login build
sudo docker push nexclipper/exporterhub:${front_tag}
sudo docker push nexclipper/exporterhub:${docker_version}
sudo docker push nexclipper/exporterhub-api:${api_tag}
sudo docker push nexclipper/exporterhub-api:${docker_version}
start: set
sudo docker-compose down
sudo docker-compose -f ./docker-compose.yml up -d
all: build push run