build(make): run npm-install before docker-compose targets

Add npm-install dependency to up/dev/prod targets so app/static/vendor
and app/node_modules exist on the host before the ./app:/app bind mount
masks the build-time artifacts inside the container.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-11 00:40:19 +02:00
parent 3132aab2a5
commit 03f17a6e05

View File

@@ -22,7 +22,7 @@ build-no-cache:
docker build --no-cache -t application-portfolio . docker build --no-cache -t application-portfolio .
.PHONY: up .PHONY: up
up: up: npm-install
# Start the application using docker-compose with build. # Start the application using docker-compose with build.
docker-compose up -d --build --force-recreate docker-compose up -d --build --force-recreate
@@ -58,12 +58,12 @@ logs:
docker logs -f portfolio docker logs -f portfolio
.PHONY: dev .PHONY: dev
dev: dev: npm-install
# Start the application in development mode using docker-compose. # Start the application in development mode using docker-compose.
FLASK_ENV=development docker-compose up -d FLASK_ENV=development docker-compose up -d
.PHONY: prod .PHONY: prod
prod: prod: npm-install
# Start the application in production mode using docker-compose (with build). # Start the application in production mode using docker-compose (with build).
docker-compose up -d --build docker-compose up -d --build