Files
drb-client-discord-bot/Makefile
Logan Cusano 75b2d0007d
Some checks failed
release-tag / release-image (push) Failing after 1m41s
Lint / lint (push) Successful in 20s
Add deploy option for make
2025-03-08 20:17:04 -05:00

48 lines
990 B
Makefile

# Path to the Docker context directory
SDR_NODE_CONTEXT = $(shell pwd)
# Path to the .env file
ENV_FILE = $(SDR_NODE_CONTEXT)/.env
# Variables
IMAGE_NAME = client-bot
CONTAINER_NAME = client-bot
# Target to build the Docker image for sdr-node
build:
docker build -t $(IMAGE_NAME) $(SDR_NODE_CONTEXT)
# Target to run the sdr-node container
run: build
docker run --rm -it \
--privileged \
-v /dev:/dev \
-v $(shell pwd)/configs:/configs \
-v $(shell pwd)/app:/app \
--name $(CONTAINER_NAME) \
--network=host \
$(IMAGE_NAME)
# Deploy docker
deploy: build
docker run --rm -d \
--privileged \
-v /dev:/dev \
-v $(shell pwd)/configs:/configs \
--name $(CONTAINER_NAME) \
--network=host \
$(IMAGE_NAME)
# Stop the Docker container
stop:
docker stop $(CONTAINER_NAME)
# Remove the Docker container
remove:
docker rm $(CONTAINER_NAME)
# Clean up (stop and remove the container)
clean: stop remove
# Rebuild the Docker image
rebuild: clean build