The compressCssCompiler has been used for javascript for a long time for this website.
Despite this not being a wise decision, it worked up until some version of Hakyll. I should
minify the javascript as part of the site building process, but for now will simply copy the
javascript files as is.
* channels.scm: Update rekahsoft-guix channel
* blog-rekahsoft-ca.scm: Removed ghc-* packages that are now part of rekahsoft-guix channel;
these ghc-* packages can be contributed upstream to guix.
The test suite depends on hspec-webdriver, which appears to have issues and is not well
supported. Future plans for the site include using hakyll to generate json that will be
consumed by a frontend vuejs application. This will make selenium testing of the hakyll
become absolute (as well as generation of css using clay).
Signed-off-by: Collin J. Doering <collin@rekahsoft.ca>
This primarily includes updating dependencies, and using stack for sane dependency management.
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
This is primarily useful when testing locally, so that the users aws config/credentials aren't
polluted, and adds little no value otherwise.
Signed-off-by: Collin J. Doering <collin@rekahsoft.ca>
Adds the variables:
- `enable_naked_domain`
Whether or not to enable access to the site only via a naked domain.
When `enable_naked_domain=true`:
- This corresponds to the previous configuration.
When `enable_naked_domain=false`:
- Sets the domain_name to the www version of the domain and adds the naked domain as a
SAN (Subject Alternative Name) on the ACM certificate
- Create dns validation records for both the naked domain and www domain
- Creates a s3 bucket with redirect policy which redirects all requests to the www version
of the site
- Creates a cloudfront web distribution with a custom origin of the website bucket
url (this is required as s3 origins do not handle redirects)
- `subdomain`
The subdomain to use under the `dns_apex`, eg `<subdomain>.<dns_apex>`. Defaults to empty.
Remember, `dns_apex` must correspond to a route53 public hosted zone.
Signed-off-by: Collin J. Doering <collin@rekahsoft.ca>
Create a classic static site deployment using cloudfront with a s3 origin. Provision, verify and
utilize a ACM certificate to enable (and force) https for cloudfront.
This assumes that the build resources are available at ./_site as a null_resource is used to
sync it to the s3 origin backing cloudfront. A IAM user and policy is provisioned prior to the
null_resource execution with least privilege access to the s3 bucket.
Note: The required terraform backend resources were manually provisioned.
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
Bootstrap the environment using:
./site init-env <stack-name> <cf-bucket> <cnames>
- stack-name :: is the stack name used for the infrastructure bootstrap cloudformation template
- cf-bucket :: is the name of the S3 bucket that holds the cloudformation stack that will bootstrap
the environment
- cnames :: is a comma separated list of domains to be used as CNames with this deployment
Note: this can also be run directly with ./init-env.sh
Once the environment has been bootstraped, the site can be deployed using the variables given
in its output.
AWS_DEFAULT_REGION=<region> \
AWS_ACCESS_KEY_ID=<access-key> \
AWS_SECRET_ACCESS_KEY=<secret-key> \
S3_BUCKET=<s3-bucket> \
./site deploy
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
- Due to some issue with the firefox webdriver plugin, selenium tests are temporarily disabled
for firefox
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>