This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Variables | ||
DOCKER_IMAGE_NAME=upvent_svelte | ||
DOCKER_CONTAINER_NAME=upvent_svelte | ||
|
||
# Generate a production build. | ||
build: | ||
npm install | ||
npm run build | ||
|
||
# Run this to start developing. | ||
debug: | ||
npm install | ||
npm run dev | ||
|
||
dev: | ||
$(MAKE) debug | ||
|
||
# Run this before pushing to git. | ||
test_before_push: | ||
npm install | ||
npm run test | ||
npm run check | ||
npm run test:unit | ||
npm run lint | ||
|
||
# Run this to check that everything is ok while developing. | ||
test: | ||
npm install | ||
npm run test | ||
|
||
# Commands for running in containers | ||
|
||
# Build docker image | ||
docker-build: | ||
npm install | ||
npm run build | ||
docker build -t $(DOCKER_IMAGE_NAME) . | ||
|
||
# Run docker container | ||
docker-run: | ||
docker run -d -p 80:80 --name $(DOCKER_CONTAINER_NAME) $(DOCKER_IMAGE_NAME) | ||
|
||
# Stop docker container | ||
docker-stop: | ||
docker stop $(DOCKER_CONTAINER_NAME) | ||
|
||
# Remove docker container | ||
docker-rm: | ||
docker rm $(DOCKER_CONTAINER_NAME) | ||
|
||
# PHONY targets | ||
.PHONY: build debug test_before_push docker-build docker-run docker-stop docker-rm |