updates to makefile for DRYRUN and DELETE (S3_CMD), new og:image
This commit is contained in:
16
Makefile
16
Makefile
@@ -37,7 +37,17 @@ DOCKER_RUN=docker run --rm ${RUN_USER} ${RUN_VOL}
|
|||||||
DISTRIBUTION_ID=$(shell docker run --rm ${AWS_ENV} ${AWS_IMAGE} cloudfront list-distributions \
|
DISTRIBUTION_ID=$(shell docker run --rm ${AWS_ENV} ${AWS_IMAGE} cloudfront list-distributions \
|
||||||
--query 'DistributionList.Items[].{id:Id,a:Aliases.Items}[?contains(a,`${WEB_BUCKET}`)].id' \
|
--query 'DistributionList.Items[].{id:Id,a:Aliases.Items}[?contains(a,`${WEB_BUCKET}`)].id' \
|
||||||
--output text)
|
--output text)
|
||||||
S3_CMD=s3 sync --acl "public-read" --sse "AES256" public/ s3://${WEB_BUCKET}
|
|
||||||
|
ifdef DRYRUN
|
||||||
|
S3_DRYRUN=--dryrun
|
||||||
|
endif
|
||||||
|
ifdef DELETE
|
||||||
|
S3_DELETE=--delete
|
||||||
|
endif
|
||||||
|
S3_CACHE_CONTROL?=86400
|
||||||
|
S3_CMD=s3 sync ${S3_DRYRUN} ${S3_DELETE} --cache-control max-age=${S3_CACHE_CONTROL} --acl "public-read" --sse "AES256"
|
||||||
|
S3_CMD_WEB=${S3_CMD} public/ s3://${WEB_BUCKET}
|
||||||
|
S3_CMD_STATIC=${S3_CMD} static/ s3://${STATIC_BUCKET}
|
||||||
CLOUDFRONT_CMD=cloudfront create-invalidation --distribution-id ${DISTRIBUTION_ID} --paths '/*'
|
CLOUDFRONT_CMD=cloudfront create-invalidation --distribution-id ${DISTRIBUTION_ID} --paths '/*'
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
@@ -55,7 +65,7 @@ static-pull:
|
|||||||
.PHONY: static-pull
|
.PHONY: static-pull
|
||||||
|
|
||||||
static-push:
|
static-push:
|
||||||
aws s3 sync --cache-control max-age=86400 --acl "public-read" --sse "AES256" ${STATIC_DIR}/ s3://${STATIC_BUCKET}
|
aws ${S3_CMD_STATIC}
|
||||||
.PHONY: static-push
|
.PHONY: static-push
|
||||||
|
|
||||||
static-images:
|
static-images:
|
||||||
@@ -89,7 +99,7 @@ static-clean:
|
|||||||
|
|
||||||
deploy: clean build
|
deploy: clean build
|
||||||
@# Upload files to S3
|
@# Upload files to S3
|
||||||
@$(DOCKER_RUN) ${AWS_ENV} ${AWS_IMAGE} ${S3_CMD}
|
@$(DOCKER_RUN) ${AWS_ENV} ${AWS_IMAGE} ${S3_CMD_WEB}
|
||||||
.PHONY: deploy
|
.PHONY: deploy
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ params:
|
|||||||
since: "2017"
|
since: "2017"
|
||||||
logoImage: "/static/img/logo.png"
|
logoImage: "/static/img/logo.png"
|
||||||
images:
|
images:
|
||||||
- "/static/img/dblogo-prev.png"
|
- "/static/img/logo-prev.png"
|
||||||
logoTitle: "bdebyl"
|
logoTitle: "bdebyl"
|
||||||
keywords: ["bastian", "de byl", "bdebyl", "bastian de byl"]
|
keywords: ["bastian", "de byl", "bdebyl", "bastian de byl"]
|
||||||
description: "A random assortment of my personal projects."
|
description: "A random assortment of my personal projects."
|
||||||
|
|||||||
Reference in New Issue
Block a user