Files
singapore_rain_radar/Makefile
2024-09-30 21:45:38 +08:00

33 lines
751 B
Makefile

APP_NAME = "sg_rain_radar"
OUTPUT_DIR = /var/www/html/other/sg_rain_radar/
DEBUG_OUTPUT_DIR = $(PWD)/out
build:
docker build . -t $(APP_NAME)
clean:
docker stop $(APP_NAME) || true
docker rm $(APP_NAME) || true
debug: clean build
mkdir -p $(DEBUG_OUTPUT_DIR)
mkdir -p $(PWD)/images/raw
mkdir -p $(PWD)/images/final
docker run \
-it \
--mount type=bind,source=$(PWD)/images,target=/home/node/app/images \
--mount type=bind,source=$(DEBUG_OUTPUT_DIR),target=/home/node/app/out \
--name $(APP_NAME) \
$(APP_NAME)
run: clean build
mkdir -p $(OUTPUT_DIR)
docker run \
-d \
--mount type=bind,source=$(OUTPUT_DIR),target=/home/node/app/out \
--name $(APP_NAME) \
--restart unless-stopped \
$(APP_NAME)
.PHONY: build debug run clean