Files
spore-ui/Makefile
2025-10-27 15:19:10 +01:00

41 lines
755 B
Makefile

.PHONY: install build run clean docker-build docker-run docker-push
# Install dependencies
install:
npm install
# Build the application (if needed)
build: install
# Run the application
run:
node index.js
# Start in development mode
dev:
node index.js
# Clean build artifacts
clean:
rm -rf node_modules
rm -f package-lock.json
# Docker variables
DOCKER_REGISTRY ?=
IMAGE_NAME = wirelos/spore-ui
IMAGE_TAG ?= latest
FULL_IMAGE_NAME = $(if $(DOCKER_REGISTRY),$(DOCKER_REGISTRY)/$(IMAGE_NAME),$(IMAGE_NAME)):$(IMAGE_TAG)
# Build Docker image
docker-build:
docker build -t $(FULL_IMAGE_NAME) .
# Run Docker container
docker-run:
docker run -p 3000:3000 --rm $(FULL_IMAGE_NAME)
# Push Docker image
docker-push:
docker push $(FULL_IMAGE_NAME)