corso/website/Makefile
Georgi Matev b6c7488c01
Fix Gulp not exiting with Ctrl-C and annoying browsersync warning (#751)
## Description

(1) Fix Gupl not exiting with Ctrl-C and (2) annoying browsersync warning
- (1) make sure `gulp` is not PID 1 in container. Add `--init` option
- (2) set `open: false`

Please check the type of change your PR introduces:
- [ ] 🌻 Feature
- [x] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [ ] 🐹 Trivial/Minor

## Issue(s)

## Test Plan

<!-- How will this be tested prior to merging.-->

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-09-02 22:59:37 +00:00

26 lines
740 B
Makefile

.PHONY: buildimage dev shell build publish sync
buildimage:
docker build -t "corso/website:latest" .
dev:
docker run --rm -it --init -p 3000:3000 -p 3001:3001 \
-v ${PWD}:/usr/src/website corso/website gulp
shell:
docker run --rm -it -p 3000:3000 -p 3001:3001 \
-v ${PWD}:/usr/src/website corso/website /bin/bash
build:
docker run --rm -it --init \
-v ${PWD}:/usr/src/website corso/website gulp build
publish: build
docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY \
-e AWS_SESSION_TOKEN --rm -v ${PWD}:/usr/src/website corso/website \
make sync
sync:
aws s3 sync /usr/src/website/dist/ s3://corsobackup.io/ --exclude ".git/*" --delete
aws cloudfront create-invalidation --distribution-id XXXXX --paths "/*"