🔥 Easy install headless content management system
Acsys is a CMS built on NodeJS. This tool was created to fulfill the need for a frontend interface for Cloud Firestore. Acsys allows developers to configure a database through the Acsys web app. Once this is done users can use Acsys as a headless content management system that also configures RESTful APIs (no coding involved). Acsys serves as a simple interface for Firestore, MySQL and SQLite databases. Since this project is maintained and used by Aeon it will receive continuous updates.
These instructions will get Acsys up and running on your local machine for development and testing purposes.
Start Acsys locally using these commands:
Run npm install
Build project by running npm run build
(npm run build-linux
for Linux)
Start development by running npm run dev
Run project in production mode by running npm run start
(executing this after building will run the project at http://localhost:8080)
or
Pull the Docker image by using this command:
docker pull acsysio/acsys
Then run using:
docker run -p 8080:8080 acsysio/acsys
With environment variable file:
docker run -p 8080:8080 --env-file .env acsysio/acsys
Official Docker Image can be found here.
Acsys can be configured in either a stateful or stateless manner. Stateful configurations are ideal for server deployments whereas stateless configurations are ideal for serverless archetectures. An Acsys configuration is considered serverless once the DATABASE_TYPE
environment variable has been set.
To configure a stateful version of Acsys for Firestore or MySQL you must first upload your service account JSON file. Instructions on how to get this file can be found here. Note that the database must be created with appropriate security rules before Acsys can be used (Default production rules are recommended).
Stateful configurations also allow you to setup a local database using SQLite. These installations only require a project name.
Connections can be changed within the web appplication. If at any point the configuration needs to be manually reset you can do so by stopping the server and deleting the dbase.db and acsys.service.config.json files.
To configure a stateless version of Acsys you must set your database and storage credentials in environment variables. Please note that when running stateless a Firebase project must be created to configure Storage regardless of configuration. The dbase.db file must also be deleted when reseting a stateless configuration.
DATABASE_TYPE
specifies database to connect to: (firestore or mysql)API_SECRET
overrides default key for stateless configurations (optional)DATABASE_HOST
database hostDATABASE_PORT
database port (optional)DATABASE
database nameDATABASE_USERNAME
database usernamePASSWORD
database passwordSOCKET_PATH
this may be required for MySQL configurations in a serverless environment (Is most often the connection name in Cloud SQL more info)DEFAULT_USERNAME
for demo onlyDEFAULT_PASSWORD
for demo onlyBUCKET
specifies Cloud Storage bucket to be usedTYPE
TYPE value found in service account keyPROJECT_ID
PROJECT_ID value found in service account keyPRIVATE_KEY_ID
PRIVATE_KEY_ID value found in service account keyPRIVATE_KEY
PRIVATE_KEY value found in service account keyCLIENT_EMAIL
CLIENT_EMAIL value found in service account keyCLIENT_ID
CLIENT_ID value found in service account keyAUTH_URI
AUTH_URI value found in service account keyTOKEN_URI
TOKEN_URI value found in service account keyAUTH_PROVIDER_X509_CERT_URL
AUTH_PROVIDER_X509_CERT_URL value found in service account keyCLIENT_X509_CERT_URL
CLIENT_X509_CERT_URL value found in service account keyWe highly recommend placing enviroment variables in a .env file as this project is setup to read the file by default.
DATABASE_TYPE=firestore
BUCKET=project-id.appspot.com
TYPE=service_account
PROJECT_ID=project-id
PRIVATE_KEY_ID=key-id
PRIVATE_KEY=-----BEGIN PRIVATE KEY-----\nprivate-key\n-----END PRIVATE KEY-----\n
CLIENT_EMAIL=service-account-email
CLIENT_ID=client-id
AUTH_URI=https://accounts.google.com/o/oauth2/auth
TOKEN_URI=https://accounts.google.com/o/oauth2/token
AUTH_PROVIDER_X509_CERT_URL=https://www.googleapis.com/oauth2/v1/certs
CLIENT_X509_CERT_URL=https://www.googleapis.com/robot/v1/metadata/x509/service-account-email
DATABASE_TYPE=mysql
DATABASE_HOST=0.0.0.0
DATABASE=demo_database
DATABASE_USERNAME=app-account
PASSWORD=password
BUCKET=project-id.appspot.com
TYPE=service_account
PROJECT_ID=project-id
PRIVATE_KEY_ID=key-id
PRIVATE_KEY=-----BEGIN PRIVATE KEY-----\nprivate-key\n-----END PRIVATE KEY-----\n
CLIENT_EMAIL=service-account-email
CLIENT_ID=client-id
AUTH_URI=https://accounts.google.com/o/oauth2/auth
TOKEN_URI=https://accounts.google.com/o/oauth2/token
AUTH_PROVIDER_X509_CERT_URL=https://www.googleapis.com/oauth2/v1/certs
CLIENT_X509_CERT_URL=https://www.googleapis.com/robot/v1/metadata/x509/service-account-email
Ensure all privileges have been granted for the database user. These include CREATE, DROP, SELECT, UPDATE, INSERT, and DELETE.
For GCP your external testing network will have to be added to the SQL connections when running locally.
There are many ways in which you can participate in the project, for example:
We encourage you to tell us what you want out of this project! Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
This project is licensed under the MIT License - see the LICENSE.md file for details.