Skip to content

digitalcorpora/digitalcorpora_app

Repository files navigation

codecov

digitalcorpora.org python app

This repo provides the custom-written Python code to for the https://DigitalCorpora.org/ website.

The website runs with WordPress. This repo runs in a sub-domain https://downloads.digitalcorproa.org/ provides the browsing functionality of the S3 bucket. Our development website is https://dev.digitalcorpora.org/

The repo is designed to be check out as ~/downloads.digitalcorpora.org/ on a Dreamhost user account. It runs the python application in Bottle using the Dreamhost Passenger WSGI framework. The repo can also be checked out into other domain directories for development and testing. You can also modify the config file to browse other S3 buckets, should you wish to use this on another website.

To setup

  1. Copy in zappa_settings.json. All defaults are here: https://github.com/zappa/Zappa/blob/master/example/zappa_settings.json
  2. Update the file
  3. Make sure that we have an app object from Flask() or bottle
  4. Deploy and test.
  5. Create a certificate for the subdomain *.domain.com at https://us-west-2.console.aws.amazon.com/acm/home?region=us-west-2#/certificates/request/public
  6. Refresh the certificate list
  7. Create the DNS entry for DNS certification. (only CNAME entry is needed, but a certificate may need to be issued for each region)
  8. Create the domain

aws deployment

Here is the policy:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "secretsmanager:GetSecretValue",
      "Resource": "SecretARN"
    }
  ]
}