-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (32 loc) · 1.16 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
.PHONEY: build build_dev run run_dev
TAG = navigator-admin-frontend
VITE_PORT ?= 3000
stop:
docker stop ${TAG} && docker rm ${TAG}
build:
docker build --build-arg VITE_PORT=${VITE_PORT} -t ${TAG} -f Dockerfile .
build_dev:
docker build --build-arg VITE_PORT=${VITE_PORT} -t ${TAG} -f Dockerfile.dev .
run_dev:
docker run --name ${TAG} -p ${VITE_PORT}:${VITE_PORT} --env-file "${PWD}/.env" --mount type=bind,source="${PWD}",target=/app ${TAG}
run:
docker run --name ${TAG} -p ${VITE_PORT}:${VITE_PORT} ${TAG}
run_ci:
docker run --name ${TAG} -p ${VITE_PORT}:${VITE_PORT} -e MY_APP_API_URL=https://admin.dev.climatepolicyradar.org/api/ ${TAG}
rebuild: stop build run_ci
with_local: build_dev
docker run --rm -it \
-p ${VITE_PORT}:${VITE_PORT} \
--network=navigator-admin-backend_default \
--env-file "${PWD}/.env" \
--mount type=bind,source="${PWD}",target=/app \
$(TAG)
install_trunk:
$(eval trunk_installed=$(shell trunk --version > /dev/null 2>&1 ; echo $$? ))
ifneq (${trunk_installed},0)
$(eval OS_NAME=$(shell uname -s | tr A-Z a-z))
curl https://get.trunk.io -fsSL | bash
endif
uninstall_trunk:
sudo rm -if `which trunk`
rm -ifr ${HOME}/.cache/trunk