├── README.md ├── docker-compose.yml ├── stop.sh └── ubuntu16 ├── README.md ├── cloudboost.service ├── install.sh └── startup.sh /README.md: -------------------------------------------------------------------------------- 1 | # CloudBoost on Docker 2 | 3 | CloudBoost is the Complete NoSQL Database Service for your app. **Think of CloudBoost as Parse + Firebase + Algolia + Iron.io all combined into one** : 4 | - Data-Storage / JSON Storage / BLOB Storage 5 | - 100% data ownership 6 | - Realtime 7 | - Search 8 | - Cache 9 | - Queues 10 | - More - ACL's, User Authentication, Server-less apps and more. 11 | 12 | 13 | ## Deploy CloudBoost with Docker. 14 | 15 | **Important:** Open Source CloudBoost only contains the API. If you're looking for dashboard and the UI, we recommend using the managed service [here](https://www.cloudboost.io). We also have an enterprise offering for enterprises where we have CloudBoost installed on your servers. Please [reach out to us here](https://cloudboostio.typeform.com/to/Y4JOQD) if you're interested. 16 | 17 | CloudBoost can be deployed to any cloud with [Docker Compose] 18 | 19 | - AWS 20 | - Azure 21 | - SoftLayer 22 | - Digital Ocean 23 | - Packet 24 | - Your private cloud. 25 | 26 | 27 | ### Before you begin 28 | 29 | You need to install these on your machine before you install CloudBoost. 30 | - [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) 31 | - [Docker](https://docs.docker.com/engine/installation/) 32 | - [Docker Compose](https://docs.docker.com/compose/install/) 33 | 34 | ### Step 1: Clone this repository. 35 | 36 | Clone this repo on your machine. 37 | 38 | ``` 39 | git clone https://github.com/CloudBoost/docker.git 40 | cd docker 41 | ``` 42 | 43 | ### Step 2: Edit compose file (optional) 44 | 45 | We've left placeholders for you to fill in `docker-compose.yml` file. If you leave this step most of CloudBoost will still work but few services like Email will not. 46 | 47 | ### Step 3: Run with Docker Compose 48 | 49 | Docker Compose file is a collection of services like MongoDB, Redis, CloudBoost Engine which is essential to run the CloudBoost Service. 50 | 51 | To install CloudBoost, you can : 52 | 53 | ``` 54 | sudo docker-compose up 55 | ``` 56 | 57 | Your CloudBoost Service is now up and running! 58 | 59 | 60 | 61 | ## Once the server is running, You can 62 | 63 | Once started, you'll see the CloudBoost Secure Key on the console. This is important, Please save it for future use. 64 | Secure Key helps you create / delete apps. 65 | 66 | ### Create an app 67 | 68 | To create an app, You need to : 69 | 70 | ``` 71 | REQUEST TYPE : POST 72 | URL : /app/ 73 | REQUEST BODY : 74 | { 75 | secureKey : YOUR_SECURE_KEY 76 | } 77 | ``` 78 | 79 | For Example (in curl) : 80 | 81 | ``` 82 | curl -H "Content-Type: application/json" -X POST -d '{"secureKey":"xxxxxx-yyyy-xxxx-yyyyy-xxx"}' http://localhost:4730/app/app1 83 | 84 | ``` 85 | 86 | ### Creating a table 87 | 88 | Table lets you store any structured data in your app. To create one, [check this documentation out](https://tutorials.cloudboost.io/en/schema/cloudtables). 89 | 90 | ### Delete an app 91 | 92 | To delete an app, You need to : 93 | 94 | ``` 95 | REQUEST TYPE : DELETE 96 | URL : /app/ 97 | REQUEST BODY : 98 | { 99 | secureKey : YOUR_SECURE_KEY 100 | } 101 | ``` 102 | 103 | For Example (in curl) : 104 | 105 | ``` 106 | curl -H "Content-Type: application/json" -X DELETE -d '{"secureKey":"xxxxxx-yyyy-xxxx-yyyyy-xxx"}' http://localhost:4730/app/app1 107 | 108 | ``` 109 | 110 | Once your app is ready, You can then get the latest SDK from https://tutorials.cloudboost.io. Remember to save the SDK in your project. and You can then init your app by : 111 | 112 | `CB.CloudApp.init('Your Server URL', 'Your App ID', 'Your App Key');` 113 | 114 | You can then follow rest of the documentation from https://tutorials.cloudboost.io. You can also check out API Reference on https://docs.cloudboost.io 115 | 116 | ## Cluster Maintenance, Scale, and Updates 117 | 118 | CloudBoost runs on MongoDB and Redis. You're responsible for managing the [uptime](https://en.wikipedia.org/wiki/Uptime), [replication](https://en.wikipedia.org/wiki/Replication_(computing)), [sharding](https://en.wikipedia.org/wiki/Shard_(database_architecture)), [backups](https://en.wikipedia.org/wiki/Backup) of your data in each of these databases. 119 | 120 | You also need to update CloudBoost with every [new release](https://github.com/cloudboost/cloudboost/releases) and you need to [configure your server to auto-scale it](https://www.brianchristner.io/how-to-scale-a-docker-container-with-docker-compose/). If you're using Docker, the image is released at the `latest` tag and you need to check for new releases atleast once a month. 121 | 122 | [Using our hosted and managed service](https://www.cloudboost.io) helps you to save time, development costs, and eliminates managing your own cluster of servers which is cheaper long-term. We recommend using the hosted service if you're running production apps. 123 | 124 | ## App Settings 125 | To read more about app settings, check [Click here](https://github.com/CloudBoost/cloudboost/tree/master/docs/app-settings) 126 | 127 | # Support 128 | 129 | - Report bugs and feature requests on [GitHub issue tracker](https://github.com/CloudBoost/cloudboost/issues). 130 | - You can reach out to us on [Slack](https://slack.cloudboost.io). All of our engineers hangout here. 131 | - [StackOverflow](stackoverflow.com/questions/tagged/cloudboost) : Tag your questions with `cloudboost` tag, so that we're notified. 132 | - Email: [support@cloudboost.io](support@cloudboost.io) 133 | - Twitter: [@cloudboostio](https://twitter.com/cloudboostio) 134 | 135 | # Contributing 136 | 137 | [Pull requests](https://help.github.com/articles/about-pull-requests/) are very welcome! 138 | 139 | We'd love to hear your feedback and suggestions in the [issue tracker](https://github.com/CloudBoost/cloudboost/issues). 140 | 141 | 142 | 143 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | mongo: 2 | image: 'mongo:3.4' 3 | ports: 4 | - '27017:27017' 5 | restart: always 6 | volumes: 7 | - '/var/lib/mongodb:/var/lib/mongodb' 8 | redis: 9 | image: 'redis:3.0' 10 | ports: 11 | - '6379:6379' 12 | - '16379:16379' 13 | - '26379:26379' 14 | restart: always 15 | api: 16 | environment: 17 | - "CLOUDBOOST_ANALYTICS_SERVICE_HOST=cluster-analytics.cloudboost.io" 18 | - "MAIL_PROVIDER= ''" 19 | - "MAIL_PROVIDER_API_KEY= ''" 20 | - "DOMAIN= ''" 21 | - "FROM_EMAIL= ''" 22 | - "FROM_NAME= ''" 23 | image: 'cloudboost/cloudboost:latest' 24 | links: 25 | - mongo 26 | - redis 27 | ports: 28 | - '4730:4730' 29 | - '80:4730' 30 | -------------------------------------------------------------------------------- /stop.sh: -------------------------------------------------------------------------------- 1 | #Stop all containers 2 | sudo docker stop $(sudo docker ps -a -q) 3 | #Remove all containers 4 | sudo docker rm $(sudo docker ps -a -q) 5 | # Delete all images 6 | sudo docker rmi $(sudo docker images -q) -------------------------------------------------------------------------------- /ubuntu16/README.md: -------------------------------------------------------------------------------- 1 | #Steps to install CloudBoost on Ubuntu 16 2 | 3 | - Change to Systemd directory `cd /etc/systemd/system` 4 | - Download cloudboost.service file `wget https://raw.githubusercontent.com/CloudBoost/docker/master/ubuntu16/cloudboost.service` 5 | - Change permission of cloudboost.service file `chmod 664 cloudboost.service` 6 | - Change to user directory `/usr/local/bin` 7 | - Download the startup script `wget https://raw.githubusercontent.com/CloudBoost/docker/master/ubuntu16/startup.sh` 8 | - Change permissions `chmod +x startup.sh` 9 | - Refresh systemctl daemon `sudo systemctl daemon-reload` 10 | - Start the cloudboost.service `sudo systemctl start cloudboost` 11 | - Enable Service at Bootup `sudo systemctl enable cloudboost` 12 | -------------------------------------------------------------------------------- /ubuntu16/cloudboost.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=CloudBoost Server 3 | 4 | [Service] 5 | PermissionsStartOnly=true 6 | ExecStart=/usr/local/bin/startup.sh 7 | Type=oneshot 8 | 9 | [Install] 10 | WantedBy=multi-user.target 11 | -------------------------------------------------------------------------------- /ubuntu16/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh - 2 | 3 | #Functions 4 | command_exists () { 5 | type "$1" &> /dev/null ; 6 | } 7 | 8 | #Install Docker 9 | if command_exists docker ; then 10 | echo "Docker Exists" 11 | else 12 | echo "Docker does not exist. Installing docker..." 13 | uname -r 14 | sudo apt-get update 15 | sudo apt-get install apt-transport-https ca-certificates 16 | sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D 17 | sudo touch /etc/apt/sources.list.d/docker.list 18 | sudo echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list 19 | sudo apt-get update 20 | sudo apt-get --assume-yes purge lxc-docker 21 | sudo apt-cache policy docker-engine 22 | sudo apt-get update 23 | sudo apt-get --assume-yes install linux-image-extra-$(uname -r) 24 | sudo apt-get --assume-yes install docker-engine 25 | fi 26 | 27 | sudo service docker start 28 | 29 | #Install Docker Compose. 30 | if command_exists docker-compose ; then 31 | echo "Docker Compose exists." 32 | else 33 | echo "Docker Compose does not exists. Installing..." 34 | sudo apt-get -y install python-pip 35 | sudo pip install docker-compose 36 | fi 37 | #Clone CloudBoost docker repo. 38 | if command_exists git ; then 39 | echo "Git exists." 40 | else 41 | echo "Git does not exists. Installing..." 42 | sudo apt-get -y install git 43 | fi 44 | 45 | #If directory exists, delete it and clone a new repo. 46 | sudo rm -rf docker 47 | git clone https://github.com/CloudBoost/docker.git 48 | cd docker 49 | 50 | #Run Docker compose. 51 | sudo docker-compose up -d 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /ubuntu16/startup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh - 2 | 3 | #Functions 4 | command_exists () { 5 | type "$1" &> /dev/null ; 6 | } 7 | 8 | sudo rm -rf CloudBoost 9 | sudo mkdir CloudBoost 10 | cd CloudBoost 11 | 12 | #Remove docker contains if it exists. 13 | #if which docker >/dev/null; then 14 | #Stop all containers 15 | # sudo docker stop $(sudo docker ps -a -q) 16 | #Remove all containers 17 | # sudo docker rm $(sudo docker ps -a -q) 18 | # Delete all images 19 | # sudo docker rmi $(sudo docker images -q) 20 | #fi 21 | 22 | #Install Git 23 | sudo apt-get update 24 | if command_exists git ; then 25 | echo "Git exists" 26 | else 27 | sudo apt-get -y install git 28 | fi 29 | 30 | #Clone Repo 31 | git clone https://github.com/CloudBoost/docker.git 32 | cd docker 33 | 34 | #Run the script. 35 | cd ubuntu16 36 | sudo bash install.sh 37 | --------------------------------------------------------------------------------