Files
drb-core-server/Makefile
2025-05-25 15:59:16 -04:00

22 lines
566 B
Makefile

# Define variables for server image name
SERVER_IMAGE = websocket-server-app
SERVER_CONTAINER_NAME = websocket-server # Give the server a fixed name
# Default target: build the server image
all: build
# Target to build the server Docker image
build:
docker build -t $(SERVER_IMAGE) .
# Target to run the server container using the host network
run: build
docker run -it --rm \
--name $(SERVER_CONTAINER_NAME) \
-e DB_NAME=$(DB_NAME) \
-e MONGO_URL=$(MONGO_URL) \
-e JWT_SECRET_KEY=$(JWT_SECRET_KEY) \
-p 5000:5000 \
-p 8765:8765 \
$(SERVER_IMAGE)