Skip to content
Snippets Groups Projects
Commit 9122b70f authored by Ole Voldsæter's avatar Ole Voldsæter
Browse files

re meta#334 bruk dev-ordbok-cache

parent 15f9c6df
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@ build-prod:
paths:
- dist
deploy:
deploy-dev:
image: uibit/awscli:latest
stage: deploy
only:
......@@ -47,6 +47,8 @@ deploy:
"AltDomainName=dev.ordbok.uib.no"
"DomainName=beta.ordbok-dev.aws.uib.no"
"PathRewriteLambdaARN=arn:aws:lambda:us-east-1:${AWS_DEV_ACCOUNT}:function:rewrite_request:2"
"OrdbokCacheOriginDomain=8mwl23g34a.execute-api.eu-west-1.amazonaws.com"
"OrdbokCacheStage=DEV"
--no-fail-on-empty-changeset
--capabilities CAPABILITY_IAM
- aws s3 rm "s3://${STACK_NAME}.aws.uib.no" --recursive
......@@ -74,6 +76,8 @@ deploy-prod:
--template-file "aws/beta.ordbok.uib.no_stack.yaml"
--parameter-overrides "CertificateArn=${CERT_ARN}"
"PathRewriteLambdaARN=arn:aws:lambda:us-east-1:${AWS_DEV_ACCOUNT}:function:rewrite_request:11"
"OrdbokCacheOriginDomain=n5speug9cl.execute-api.eu-west-1.amazonaws.com"
"OrdbokCacheStage=PROD"
--no-fail-on-empty-changeset
--capabilities CAPABILITY_IAM
- aws s3 rm "s3://${STACK_NAME}.aws.uib.no" --recursive
......
......@@ -37,6 +37,16 @@ Parameters:
Type: String
Description: ARN to lambda function in us-east-1 used to rewrite paths
OrdbokCacheOriginDomain:
Type: String
Description: Domain name for ordbok cache
OrdbokCacheStage:
Type: String
AllowedValues:
- DEV
- PROD
###############################################################################
Resources:
###############################################################################
......@@ -109,8 +119,8 @@ Resources:
S3OriginConfig:
OriginAccessIdentity: !Sub "origin-access-identity/cloudfront/${CloudFrontOriginIdentity}"
- Id: OrdbokCache
DomainName: "n5speug9cl.execute-api.eu-west-1.amazonaws.com"
OriginPath: "/PROD"
DomainName: !Ref OrdbokCacheOriginDomain
OriginPath: !Sub "/${OrdbokCacheStage}"
CustomOriginConfig:
OriginProtocolPolicy: https-only
OriginKeepaliveTimeout: 60
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment