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

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.

What is created ?

  • S3 Bucket
  • Cloudfront Distribution
  • CodeBuild Project
    • Triggered from EventBridge
Last modified April 21, 2020: Add installation doc (5595b5e)