Skip to content

Commit

Permalink
Refactor Makefile and add docker-compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
sahi-mfg committed Mar 6, 2024
1 parent 541b9fe commit 2d33bdd
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
# Variables
IMAGE_NAME = age-detection-api
CONTAINER_NAME = age-detection-api-container
PORT = 5001

# Created Date: Tuesday, June 29th 2021, 10:00:00 pm
# Targets
.PHONY: build run stop clean

build:
docker build -t $(IMAGE_NAME) .

run:
docker run -d -p $(PORT):$(PORT) --name $(CONTAINER_NAME) $(IMAGE_NAME)
up:
docker-compose up --build

stop:
docker stop $(CONTAINER_NAME) && docker rm $(CONTAINER_NAME)
down:
docker-compose down

clean: stop
docker rmi $(IMAGE_NAME)

test:
pip3 install -r requirements.txt
Expand Down

0 comments on commit 2d33bdd

Please sign in to comment.