Skip to content

Commit

Permalink
Adding main entrypoint as a var on makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
marcieltorres committed Feb 12, 2024
1 parent 504a5c5 commit f15b112
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ endif
APP_NAME="python-boilerplate-project"
IMAGE_NAME="python-boilerplate-project"
VERSION="latest"
MAIN_ENTRYPOINT="src/main.py"


################################
# COMMANDS TO RUN LOCALLY
Expand All @@ -25,7 +27,7 @@ local/lint/fix:
poetry run ruff . --fix

local/run:
poetry run python src/main.py
poetry run python ${MAIN_ENTRYPOINT}

############################################
# COMMANDS TO RUN USING DOCKER (RECOMMENDED)
Expand All @@ -47,10 +49,10 @@ docker/lint:
docker-compose run ${APP_NAME} poetry run ruff check .

docker/lint/fix:
docker-compose run ${APP_NAME} poetry run ruff . --fix --exit-non-zero-on-fix
docker-compose run ${APP_NAME} poetry run ruff . --fix

docker/run:
docker-compose run ${APP_NAME} poetry run python src/main.py
docker-compose run ${APP_NAME} poetry run python ${MAIN_ENTRYPOINT}

####################################
# DOCKER IMAGE COMMANDS
Expand Down

0 comments on commit f15b112

Please sign in to comment.