Initial move
This commit is contained in:
25
makefile
Normal file
25
makefile
Normal file
@@ -0,0 +1,25 @@
|
||||
# Define variables
|
||||
DOCKER_IMAGE_NAME := drb-server
|
||||
|
||||
# Define targets and rules
|
||||
.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..."
|
||||
docker build -t $(DOCKER_IMAGE_NAME) .
|
||||
|
||||
run:
|
||||
@echo "Running Docker container..."
|
||||
docker run -d --rm -e NODE_ENV=${NODE_ENV} \
|
||||
-e SERVER_PORT=${SERVER_PORT} \
|
||||
-e MONGO_URL=${MONGO_URL} \
|
||||
-e DISCORD_TOKEN=${DISCORD_TOKEN} \
|
||||
-p ${SERVER_PORT}:${SERVER_PORT} \
|
||||
--name=drb \
|
||||
$(DOCKER_IMAGE_NAME)
|
||||
Reference in New Issue
Block a user