Public Site Setup
Install and configure publicsite-grid.
Download Stack
git clone https://github.com/yapawa/publicsite-grid
cd publicsite-grid
Configure Stack
Create a .env file:
HUGO_TITLE="Site Title"
HUGO_PARAMS_PAGETITLEPREFIX=""
HUGO_THEME="grid"
HUGO_LANGUAGECODE="en"
HUGO_PARAMS_API="https://admin.gallery.example.com/api/" # Use your manager domain
HUGO_PARAMS_CACHEDOMAIN="img.gallery.example.com" # Use your imageResizer domain
HUGO_PARAMS_TAGLINE="Site Tagline"
HUGO_PARAMS_THEMECOLOR="white" # white or grey
AWS_PROFILE=AWSProfile
AWS_REGION=AWSRegion
DOMAIN_NAME=gallery.example.com
CERTIFICATE_ARN=arn:aws:acm:us-east-1:XXXXXX:certificate/yyyyyyyy
HOSTED_ZONE_ID=HostedZoneId
HUGO_GOOGLEANALYTICS="UA-Tracking-Code"
WEBCLIENTID="webclientId" # aws_user_pools_web_client_id from albumsManager/src/aws-exports.js
- WEBCLIENTID: aws_user_pools_web_client_id from Albums Manager.
Multiple deployments
If you are using several stacks in the same AWS account, you need to edit.env before deploying each of them.Deploy the stack
bash setup.sh
The CodeBuild project is run automatically once the stack is provisioned. If you don’t want that, comment out the last line of setup.sh.
S3 readiness
If you deploy outside of us-east-1, your domain won’t be accessible once the deploy is finished. You will need to wait up to one hour for the bucket redundancy to be ready. if you try to access you will be redirected to the Bucket webhosting endpoint. This is an AWS issue, nothing that can be done.What is created ?
- S3 Bucket
- Cloudfront Distribution
- CodeBuild Project
- Triggered from EventBridge
Last modified April 21, 2020: Add installation doc (5595b5e)