-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (22 loc) · 919 Bytes
/
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
.PHONY: all install build test build-docker run-docker stop-docker publish-docker
all: install build test build-docker
SHELL := /usr/bin/env bash
AWS_REGION ?= us-east-1
TAG_VERSION ?= latest
PLATFORM ?= linux/arm64
install:
@npm install
build:
NODE_OPTIONS=--openssl-legacy-provider npm run build
test:
@npm run test
build-docker:
docker buildx build -t helium/frontend:latest -t helium/frontend:$(TAG_VERSION) --platform=$(PLATFORM) --load .
run-docker:
docker compose up -d
stop-docker:
docker compose stop
publish-docker: build-docker
aws ecr get-login-password --region $(AWS_REGION) | docker login --username AWS --password-stdin $(AWS_ACCOUNT_ID).dkr.ecr.us-east-1.amazonaws.com
docker tag helium/frontend:$(TAG_VERSION) $(AWS_ACCOUNT_ID).dkr.ecr.us-east-1.amazonaws.com/helium/frontend:$(TAG_VERSION)
docker push $(AWS_ACCOUNT_ID).dkr.ecr.us-east-1.amazonaws.com/helium/frontend:$(TAG_VERSION)