This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
Lateinicus/backend/Makefile

31 lines
677 B
Makefile
Raw Normal View History

2018-09-20 16:44:46 +00:00
node_modules:
npm install
WEBPACK_BUILD := ./node_modules/.bin/webpack-cli --config webpack.config.js
2018-10-03 19:04:30 +00:00
dist/bundle.js: prod
.PHONY: prod
prod:
2018-10-03 19:04:30 +00:00
${WEBPACK_BUILD} --mode production
.PHONY: dev
dev:
2018-10-03 19:04:30 +00:00
${WEBPACK_BUILD} --mode development
2018-09-20 16:50:15 +00:00
.PHONY: start
start: dev
2018-09-23 19:52:29 +00:00
node dist/bundle.js
2018-09-28 21:33:28 +00:00
2018-10-03 19:04:30 +00:00
VERSION := $(shell cat package.json | jq -r ".version")
CONTAINER_TAG := "lateinicus/server:${VERSION}"
container: dist/bundle.js
@echo Building the container
cp wait-for dist/
sudo docker build -t ${CONTAINER_TAG} -f Dockerfile dist/
rm -f dist/wait-for
@echo Exporting the container
sudo docker save ${CONTAINER_TAG} > backend.tar
tar -czf backend.tgz backend.tar
rm -f backend.tar