Files
DRBv3/server/makefile
Logan Cusano 49e52d8944
Some checks failed
DRB Build Tests / build (push) Failing after 7s
DRB Build Tests / drb_build_and_test (push) Failing after 58s
Add makefile for server and related action build test
2024-04-28 04:46:08 -04:00

20 lines
675 B
Makefile

# Define variables
DOCKER_IMAGE_NAME := drb-server
# Define targets and rules
.PHONY: build run
build:
@echo "Building Docker image..."
docker build -t $(DOCKER_IMAGE_NAME) ./server
run:
@echo "Running Docker container..."
docker run -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} \
-e SERVER_PORT=${SERVER_PORT} \
-e MONGO_URL=${MONGO_URL} \
-p ${SERVER_PORT}:${SERVER_PORT} \
$(DOCKER_IMAGE_NAME)