Update makefile with clean step
Some checks failed
DRB Build Tests / build (push) Failing after 7s
DRB Build Tests / drb_build_and_test (push) Has been cancelled

This commit is contained in:
Logan Cusano
2024-04-28 05:04:52 -04:00
parent 38cb1054e0
commit c81dce99e2
2 changed files with 9 additions and 3 deletions

View File

@@ -2,7 +2,13 @@
DOCKER_IMAGE_NAME := drb-server
# Define targets and rules
.PHONY: build run
.PHONY: clean build run
clean:
@echo "Cleaning existing Docker images, containers, and builds..."
docker stop drb || true
docker rm drb || true
docker rmi $(DOCKER_IMAGE_NAME) || true
build:
@echo "Building Docker image..."
@@ -10,7 +16,7 @@ build:
run:
@echo "Running Docker container..."
docker run -e NODE_ENV=${NODE_ENV} \
docker run -it --rm -e NODE_ENV=${NODE_ENV} \
-e MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME} \
-e MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD} \
-e MONGO_INITDB_DATABASE=${MONGO_INITDB_DATABASE} \