Skip to content
Backpulse's core. Backpulse is an API Based CMS. Build you own website without worrying about the content administration system.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
constants use go mod; add Makefile to auto build; use s6 in Dockerfile Apr 7, 2019
database
hack/docker use godotenv load env file into ENV as config Apr 7, 2019
handlers projects fix Apr 7, 2019
models generate ShortID for Tracks and Videos Apr 7, 2019
routes
utils gcloud fix Apr 6, 2019
.env use godotenv load env file into ENV as config Apr 7, 2019
.gitignore use godotenv load env file into ENV as config Apr 7, 2019
.gitlab-ci.yml Open sourcing of Backpulse's core Apr 3, 2019
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Apr 7, 2019
Dockerfile use godotenv load env file into ENV as config Apr 7, 2019
LICENSE
Makefile use go mod; add Makefile to auto build; use s6 in Dockerfile Apr 7, 2019
README.md use godotenv load env file into ENV as config Apr 7, 2019
config.json.template Open sourcing of Backpulse's core Apr 3, 2019
go.mod use godotenv load env file into ENV as config Apr 7, 2019
go.sum Merge pull request #3 from alimy/pr-env Apr 7, 2019
main.go
strings.json Open sourcing of Backpulse's core Apr 3, 2019

README.md

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

You can’t perform that action at this time.