corso/website/Makefile
Niraj Tolia c145f711ee
Change the website preview ports to 5050/5051 (#935)
## Description

Change the website preview ports to 5050/5051

This allows one to run the docs and website previews at the same time.

## Type of change

- [x] 🌻 Feature

## Test Plan

- [x] 💪 Manual
2022-09-23 15:36:04 +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 5050:3000 -p 5051:3001 \
-v ${PWD}:/usr/src/website corso/website gulp
shell:
docker run --rm -it -p 5050:3000 -p 5051: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 "/*"