operations: Update primary Makefile to reflect new API ECS-based build and deploy process.
This commit is contained in:
parent
e3f214d0da
commit
f29b1a0967
19
Makefile
19
Makefile
@ -5,14 +5,9 @@ build: dist/personal-measure-api.tar.gz dist/personal-measure-web.tar.gz
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm -r dist
|
-rm -r dist
|
||||||
-rm api/personal_measure_api
|
|
||||||
-rm -r web/dist
|
-rm -r web/dist
|
||||||
|
-docker container prune
|
||||||
dist/personal-measure-api.tar.gz:
|
-docker image prune
|
||||||
-mkdir dist
|
|
||||||
make -C api personal_measure_api
|
|
||||||
tar czf dist/personal-measure-api-${VERSION}.tar.gz -C api personal_measure_api
|
|
||||||
cp dist/personal-measure-api-${VERSION}.tar.gz dist/personal-measure-api.tar.gz
|
|
||||||
|
|
||||||
dist/personal-measure-web.tar.gz:
|
dist/personal-measure-web.tar.gz:
|
||||||
-mkdir dist
|
-mkdir dist
|
||||||
@ -20,13 +15,9 @@ dist/personal-measure-web.tar.gz:
|
|||||||
tar czf dist/personal-measure-web-${VERSION}.tar.gz -C web/dist .
|
tar czf dist/personal-measure-web-${VERSION}.tar.gz -C web/dist .
|
||||||
cp dist/personal-measure-web-${VERSION}.tar.gz dist/personal-measure-web.tar.gz
|
cp dist/personal-measure-web-${VERSION}.tar.gz dist/personal-measure-web.tar.gz
|
||||||
|
|
||||||
#deploy-api: dist/personal-measure-api.tar.gz
|
deploy-api:
|
||||||
# mkdir -p temp-deploy/personal-measure-api-${VERSION}
|
make -C api personal_measure_api-image push-image
|
||||||
# tar xzf dist/personal-measure-api-${VERSION}.tar.gz -C temp-deploy/personal-measure-api-${VERSION}
|
cd operations/terraform && terraform apply -target module.${TARGET_ENV}_env.aws_ecs_task_definition.pmapi -target module.${TARGET_ENV}_env.aws_ecs_service.pmapi
|
||||||
# -ssh pmapi@pmapi.jdb-labs.com "sudo systemctl stop personal_measure_api.$(TARGET_ENV).service"
|
|
||||||
# scp temp-deploy/personal-measure-api-${VERSION}/personal_measure_api pmapi@pmapi.jdb-labs.com:/home/pmapi/$(TARGET_ENV)/personal_measure_api
|
|
||||||
# ssh pmapi@pmapi.jdb-labs.com "sudo systemctl start personal_measure_api.$(TARGET_ENV).service"
|
|
||||||
# rm -r temp-deploy
|
|
||||||
|
|
||||||
deploy-web: dist/personal-measure-web.tar.gz
|
deploy-web: dist/personal-measure-web.tar.gz
|
||||||
mkdir -p temp-deploy/personal-measure-web-${VERSION}
|
mkdir -p temp-deploy/personal-measure-web-${VERSION}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user