Start by clicking on "Use this template" to create your own copy of this repo. Clone it to your local machine, and open a terminal at the project's directory.
Click here to provision a brand new Morpheme application on Heroku:
For subsequent deployments, we recommend configuring Github Integration, so that your application will be automatically redeployed whenever you push to your nominated branch.
Otherwise, please refer to Heroku's Deployment docs to see what other strategies are available to you.
To spin up your own local instance of this application, follow these instructions:
- Ensure that you have
docker
anddocker-compose
installed. - Create a
.env
file at the project root, using.env.sample
as a template. Fill in all of the secret values. - Optionally, edit
config.json
if you wish to override any configuration defaults. Refer todocs/CONFIG.md
for more details. - Optionally, edit
replacements.json
if you wish to augment the built-in replacements. Refer todocs/REPLACEMENTS.md
for more details. - Start the application with
docker-compose up --build
.
You can track the available Morpheme versions on the Morpheme Releases page.
When a new release is available, you can edit your Dockerfile
to change the version (the part after the :
)
- FROM ghcr.io/diesdasdigital/morpheme:old-version
+ FROM ghcr.io/diesdasdigital/morpheme:new-version
Then, you'll need to trigger a new Heroku deployment (see Deployment above).
Morpheme uses the Google Cloud Text-to-Speech and Natural Language APIs to generate audio from text. The resulting audio files are stored on Amazon S3.
You will need both a Google Cloud account and an AWS account to setup the application, they should be configured according to the steps below.
- Login to the AWS S3 Console.
- Create an S3 bucket.
- Create an AWS Access Key via the Security Credentials Page of the AWS Console and store it in a secure place.
- Login to the Google Cloud Console.
- Create a new Service Account/Project for your instance of Morpheme from the Service Accounts Page of the Google Cloud Console.
- Enable the Cloud Text-to-Speech and Cloud Natural Language APIs for the service account you just created.
- Create a Service Account Access Key and store the JSON key file in a secure place.
The Google Cloud and AWS credentials need to be added as Config Variables to the app for it to be deployed successfully. You'll be prompted to enter them in Heroku's "Create New App" interface after clicking the "Deploy to Heroku" button.
To connect the app to S3 the 'Access Key ID', 'Secret Access Key' and the name of the bucket need to be entered in Heroku's setup form. To use Google Cloud APIs the contents of the JSON key file need to be copied in the corresponding field to the same form.