/core

Backpulse's core. Backpulse is an API Based CMS. Build you own website without worrying about the content administration system.

Primary LanguageGoMIT LicenseMIT

forthebadge forthebadge

Donate Donate Donate

Backpulse

Backpulse core

Backpulse is an API Based / Headless CMS.
Your site's content is accessible directly via our RESTful API, on any web framework and any device.

Installation

With a correctly configured Go toolchain:

go get github.com/backpulse/core

Build&Run from source

With a correctly configured(go version >=go1.11) Go toolchain:

git clone https://github.com/backpulse/core
cd core
make build
./backpulse

Docker Build&Run

docker build -t <your-backpulse-tag> .
docker run -d --link <mongodb-container>:mongodb <your-backpulse-tag>

or docker run in custom environment

docker run -d \
           --link <mongodb-container>:mongodb \
           --env MONGODB_URI=mongodb://mongodb:27017 \
           --env DATABASE=backpulse \
           <your-backpulse-tag>

Usage

First, you need to create a config.json using the config.json.template file.

  • URI : MongoDB server address (mongodb://...)
  • Database : MongoDB database name
  • Secret : A secret key to encrypt JWT
  • GmailAddress : A gmail address if you wish to send confirmation emails
  • GmailPassword : The password associated with the gmail address obviously
  • StripeKey : Your Stripe Key if you wish to integrate Stripe
  • BucketName : Your Google Cloud Storage Bucket's name to store user files (images, binaries, plain text...)

You can also pass all these variables as environment variables:

  • MONGODB_URI
  • DATABASE
  • SECRET
  • GMAIL_ADDRESS
  • GMAIL_PASSWORD
  • STRIPE_KEY
  • BUCKET_NAME

Note: If a config.json file is found, it will override environment variables.

Then, you need to get your Google Service Account Key:

  • Go to this page.
  • Create a new account with the Project -> Owner role.
  • Download your private key as JSON.
  • Move it to the root of this project.
  • Rename it google_credentials.json.

You can also pass the content of this json file as an environment variable:

GOOGLE_APPLICATION_CREDENTIALS = {"type": "service_account", "project_id": "projectID", ...}

You're all set to run Backpulse!

go build -o backpulse && backpulse

Note: By default Backpulse runs on port 8000, but can be overridden with the PORT environment variable.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT © Aurèle Oulès