A little app to help you understand and have fun with even the most complicated Wikipedia articles!
- Deployment is handled by AWS SAM. Ensure you have the AWS SAM CLI setup properly.
- Create an OpenAI API key for communicating with the ChatGPT API.
- Ensure you have your setup a public hosted zone in Route 53 for your domain.
- Ensure you have a ACM certificate that is DNS validated.
- Checkout a new branch. The stack name will be based on your branch name.
- Copy and rename the
.makerc_example
file to.makerc
. Add values for the following keys:
- DOMAIN_NAME: The domain name (eg. summariser.com, test.summariser.com) you want to use. Note: the domain you specify must be covered by the domain names specifed in your previously created ACM certificate
- HOSTED_ZONE_NAME: The name of your previously created Route 53 hosted zone name
- CERTIFICATE_ARN: The ARN of your previously created ACM certificate
- STACK_TAGS: (optional) Tags you want added to your CloudFormation resources in the form of "key=value key2=value2"
- Run
make deploy
to create all necessary AWS resources in your account. Pressy
when prompted. - When the deployment has finished, look for the
OpenAPIKeyParam
key in the Outputs section of the terminal printout. Copy theValue
(the name of the created SSM Paramter). - Run the following command, changing the
--name
and--value
flags, to add your OpenAI API key to this parameter. We need to do this manually as CloudFormation cannot create encrypted parameters:aws ssm put-parameter --overwrite --name THE-NAME-YOU-COPIED-FROM-OUTPUTS --type SecureString --value YOUR-OPEN-AI-API-KEY
. - Click the
BaseUrl
in the Outputs to take you to your deployed Litepedia homepage!
After making changes, run make deploy
to push your changes up to AWS. Unfortunately, sam sync
does not work, as we have to manually copy over the views
and public
folders into the build directory.
See the handler/local-dev
folder.
Did you remember to update the created SSM parameter with your OpenAI API key? See step 5 in the Getting started section