Torus CMS is an open source micro service based serverless content management system (CMS) for building, managing and deploying static sites in a light, cost-effective way. It's mobile compatible and it provides a friendly GUI, allowing you to easily publish content from any device.
Torus CMS is standalone and can be added to any static site. There is no need to migrate your site, learn a new language or do any maintenance.
- Make sure you have node.js and npm installed. You can checkout this tutorial to install npm and node in mac, linux (debian/ubuntu).
- Have an AWS account. If you don't have an AWS account, you can easily create one here. Don't worry, everything you do with this project will fall within the AWS free tier limit!
-
Clone the git repository
-
Go into the directory of the project
cd torus_cms
-
Install all dependencies by running
npm install
-
Install the amplify CLI if you havn't done so already
npm install -g @aws-amplify/cli
-
run the deplyment script
node deployment-script.js
-
Configure amplify by running
amplify configure
- If you need help with configuration check out this video tutorial
-
Create a file called .env withe the following variables
AWS_ACCESS_KEY_ID=your-access-key AWS_SECRET_ACCESS_KEY=your-secret-access-key AWS_REGION=us-east-1 AWS_ACCOUNT_NUMBER=your-aws-account-number
-
To find your AWS account number, go to the AWS console support center
-
Initialize a new amplify project inside your react app
amplify init
-
Add authentication
amplify add auth
use the default configuration -
Add an S3 storage bucket
amplify add storage
** you can use the space bar to select multiple options -
Add a graphQL API
amplify add api
to easily store and retrieve data from dynamoDB -
Set up hosting for the amplify app
amplify hosting add
- Select
dev
- For the name of the bucket, enter
admin.your-domain.com
replace your-domain.com with your domain.
- Select
-
Re-run the deployment script. Add a -dev at the end of the name your sotrage bucket (e.g. yourstorage-bucket-dev). this assumes you named your environment dev.
-
Make sure to change the nameservers in your domain's DNS settings to use the four nameservers from route 53. This step will vary depending on your domain name registrar.
-
Add a two more variables to your .env file containing your API's invoke URL and your website's url.
REACT_APP_COPY_BUCKET_URL=your-invoke-url
REACT_APP_SITE_URL=http://your-domain.com
-
Now your ready to publish your app. Run
amplify publish
- Do you want to generate code for your newly created api?
No
- Be a bit patient ...
- Do you want to generate code for your newly created api?
-
Your all set! now you can upload pictures and articles to your static site!
-
Instead of publishing the admin app you can also only publish the backend by running
amplify push
then you can run the app locally withnpm start