Giter Site home page Giter Site logo

docker's Introduction

Build Status OpenCollective

CloudBoost is the complete cloud platform for your app. Think of CloudBoost as Parse + Firebase + Algolia + Iron.io all combined into one :

  • Data-Storage / JSON Storage / BLOB Storage
  • 100% data ownership
  • Realtime
  • Search
  • More - ACL's, User Authentication, and more.

CloudBoost also has a managed service, so you don't have to install or configure anything. You can sign up for the managed service here.

Deploy with Docker (recommended)

You can install CloudBoost anywhere you like. We have a Docker Compose file that can help you get started with CloudBoost in few minutes and with just one command. You can use this compose file to install the service locally on your local dev machine, or you can install the service to Azure, AWS, DigitalOcean, Softlayer, Packet and more.

Check out our Docker Compose file here.

Running the server without Docker

Important: Before you begin you need to install MongoDB 3.4 and Redis 3.0 on your machine to run this project.

Step 1 : Git clone the project.

git clone https://github.com/CloudBoost/cloudboost.git

Step 2 : Change directory to CloudBoost.

cd cloudboost

Step 3 : NPM Install.

npm install

Note : NPM requires NodeJS to be installed on your machine. If you don't have NodeJS, you need to install it from here : https://nodejs.org/en/download/

Step 4 : Edit cloudboost.json.

Create a config folder in project root if it does not exist. You need to create a new file cloudboost.json under config folder and save that file with MongoDB and Redis configuration. Here's a sample file :

{
 "mongo" : [{
   "host" : "localhost",
   "port" : "27017"
 }],
 "redis" : [{
       "host" : "127.0.0.1",
       "port" : 6379       
   }]
}

Step 5 : Edit smtp.json.

In the config folder. Creare a new file called smtp.json. You need to create an account at MailGun (https://www.mailgun.com/) and get an API Key. This will help CloudBoost to send emails on your behalf. Here's a quick example :

{
  "provider"  : "mailgun",		
  "apiKey"    : "XXXXXXXXXXXXXXXXXXXXXXX",
  "domain"    : "cloudboost.io",
  "fromEmail" : "[email protected]",
  "fromName"  : "CloudBoost.io"  
}

Step 6 : Enable HTTPS. (Optional)

If you want to enable HTTPS, place your certificate file cert.crt and key key.key in the config folder.

Step 7 : Run the server.

Make sure both Redis and MongoDB are running and then run the CloudBoost server

node server.js

Once the server is running. You'll see the ClusterKey and SecureKey on the console which means you've successfully started CloudBoost. If you don't see any of these keys, please raise a GitHub issue and let us know.

Once the server is running, You can

Once started, you'll see the CloudBoost Secure Key on the console. This is important, Please save it for future use. Secure Key helps you create / delete apps.

Create an app

To create an app, You need to :

        REQUEST TYPE : POST
        URL : <YOUR_SERVER_URL>/app/<APP ID>
        REQUEST BODY :
        {
            secureKey : YOUR_SECURE_KEY
        }

For Example (in curl) :

curl -H "Content-Type: application/json" -X POST -d '{"secureKey":"xxxxxx-yyyy-xxxx-yyyyy-xxx"}' http://localhost:4730/app/app1

Creating a table

Table lets you store any structured data in your app. To create one, check this documentation out.

Delete an app

To delete an app, You need to :

        REQUEST TYPE : DELETE
        URL : <YOUR_SERVER_URL>/app/<APP ID>
        REQUEST BODY :
        {
            secureKey : YOUR_SECURE_KEY
        }

For Example (in curl) :

        curl -H "Content-Type: application/json" -X DELETE -d '{"secureKey":"xxxxxx-yyyy-xxxx-yyyyy-xxx"}' http://localhost:4730/app/app1

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 :

CB.CloudApp.init('Your Server URL', 'Your App ID', 'Your App Key');

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

JavaScript SDK

JavaScript SDK can be found in the sdk folder of this repo.

NPM Installation

npm install cloudboost

NodeJS Usage

var CB = require('cloudboost');

Bower Installation

bower install cloudboost

JavaScript Usage

<script src="bower_components/cloudboost/dist/cloudboost.js"></script>

Module Bundlers

// For ES6/ES7 , TypeScript(typings included)
import * as CB from 'cloudboost';

//For ES5 (requireJs)
var CB = require('cloudboost');

Sample Code

// AppID and AppKey are your App ID and key of the application created in CloudBoost Dashboard.

//Init your Application
CB.CloudApp.init('YourAppId','YourAppKey');

//Data Storage : Create a CloudObject of type 'Custom' (Note: You need to create a table 'Custom' on CloudBoost Dashboard)

var obj = new CB.CloudObject('Custom');

//Set the property 'name' (Note: Create a column 'name' of type text on CloudBoost Dashboard)
obj.set('name','CloudBoost');

//Save the object
obj.save({
    success:function(res){
        console.log("object saved successfully");
    },
    error:function(err){
        console.log("error while saving object");
    }
});

Cluster Maintenance, Scale, and Updates

CloudBoost runs on MongoDB and Redis. You're responsible for managing the uptime, replication, sharding, backups of your data in each of these databases.

You also need to update CloudBoost with every new release and you need to configure your server to auto-scale it. 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.

Using our hosted and managed service 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.

App Settings

To read more about app settings, check Click here

Support

Contributing

Pull requests are very welcome!

We'd love to hear your feedback and suggestions in the issue tracker.

LICENSE

Copyright 2020 HackerBay, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

docker's People

Contributors

blacksector avatar danibjor avatar nawazdhandala avatar ritishgumber avatar shubhamqweasd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker's Issues

Invalid Compose File format

While running docker-compose , following error is coming ..

ERROR:
Can't find a suitable configuration file in this directory or any
parent. Are you in the right directory?

    Supported filenames: docker-compose.yml, docker-compose.yaml

After renaming file , the following error fetches.

ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for mongo: 'autodestroy'
Unsupported config option for redis: 'autodestroy'
Unsupported config option for accounts: 'roles'
Unsupported config option for api: 'roles'
Unsupported config option for dashboard: 'roles'
Unsupported config option for service: 'roles'

Readme using sudo with docker-compose up gives an error

Hi,
if you run sudo docker-compose up you'll just get an error:

/Users/noby/Code/docker > sudo docker-compose up
ERROR: Couldn't connect to Docker daemon - you might need to run docker-machine start default.
/Users/noby/Code/docker > ls
README.md docker-compose.yml stop.sh ubuntu16
/Users/noby/Code/docker > docker-compose up
Pulling redis (redis:3.0)...
3.0: Pulling from library/redis
f5cc0ee7a6f6: Pull complete
5fc25ed18e87: Pull complete

User service not starting

Just keeps rebooting continuously. All other containers are running fine

`cloudboost-user-service_1 | npm info it worked if it ends with ok
cloudboost-user-service_1 | npm info using [email protected]
cloudboost-user-service_1 | npm info using [email protected]
npm info lifecycle [email protected]prestart: [email protected]
npm info lifecycle [email protected]
start: [email protected]

cloudboost-user-service_1 | > [email protected] start /usr/src/app
cloudboost-user-service_1 | > node server.js
cloudboost-user-service_1 |
Mongo DB : mongodb://_GLOBAL
cloudboost-user-service_1 | Models,Services,Routes Status : OKay.
cloudboost-user-service_1 | Data Services URL : http://172.17.0.4:4730
cloudboost-user-service_1 | Analytics URL:https://analytics.cloudboost.io
cloudboost-user-service_1 |
cloudboost-user-service_1 | CBFrontend Services runing on PORT:3000
cloudboost-user-service_1 |
cloudboost-user-service_1 | /usr/src/app/node_modules/mongoose/node_modules/mongodb/lib/server.js:242
cloudboost-user-service_1 | process.nextTick(function() { throw err; })
cloudboost-user-service_1 | ^
cloudboost-user-service_1 | Error: getaddrinfo ENOTFOUND _GLOBAL _GLOBAL:27017
cloudboost-user-service_1 | at errnoException (dns.js:26:10)
cloudboost-user-service_1 | at GetAddrInfoReqWrap.onlookup as oncomplete

cloudboost-user-service_1 | npm info lifecycle [email protected]start: Failed to exec start script
cloudboost-user-service_1 | npm ERR! Linux 3.10.0-327.22.2.el7.x86_64
cloudboost-user-service_1 | npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
cloudboost-user-service_1 | npm ERR! node v5.6.0
cloudboost-user-service_1 | npm ERR! npm v3.6.0
cloudboost-user-service_1 | npm ERR! code ELIFECYCLE
cloudboost-user-service_1 | npm ERR! [email protected] start: node server.js
cloudboost-user-service_1 | npm ERR! Exit status 1
cloudboost-user-service_1 | npm ERR!
cloudboost-user-service_1 | npm ERR! Failed at the [email protected] start script 'node server.js'.
cloudboost-user-service_1 | npm ERR! Make sure you have the latest version of node.js and npm installed.
cloudboost-user-service_1 | npm ERR! If you do, this is most likely a problem with the CbFrontendServices package,
cloudboost-user-service_1 | npm ERR! not with npm itself.
cloudboost-user-service_1 | npm ERR! Tell the author that this fails on your system:
cloudboost-user-service_1 | npm ERR! node server.js
cloudboost-user-service_1 | npm ERR! You can get information on how to open an issue for this project with:
cloudboost-user-service_1 | npm ERR! npm bugs CbFrontendServices
cloudboost-user-service_1 | npm ERR! Or if that isn't available, you can get their info via:
cloudboost-user-service_1 | npm ERR! npm owner ls CbFrontendServices
cloudboost-user-service_1 | npm ERR! There is likely additional logging output above.
cloudboost-user-service_1 |
cloudboost-user-service_1 | npm ERR! Please include the following file with any support request:
cloudboost-user-service_1 | npm ERR! /usr/src/app/npm-debug.log
cloudboost-user-service_1 |
cloudboost-user-service_1 | npm info it worked if it ends with ok
cloudboost-user-service_1 | npm info using [email protected]
cloudboost-user-service_1 | npm info using [email protected]
npm info lifecycle [email protected]
prestart: [email protected]
npm info lifecycle [email protected]~start: [email protected]

cloudboost-user-service_1 | > [email protected] start /usr/src/app
cloudboost-user-service_1 | > node server.js
cloudboost-user-service_1 |
Mongo DB : mongodb://_GLOBAL
cloudboost-user-service_1 | Models,Services,Routes Status : OKay.
cloudboost-user-service_1 | Data Services URL : http://172.17.0.4:4730
cloudboost-user-service_1 | Analytics URL:https://analytics.cloudboost.io
cloudboost-user-service_1 |
cloudboost-user-service_1 | CBFrontend Services runing on PORT:3000
cloudboost-user-service_1 |
cloudboost-user-service_1 | /usr/src/app/node_modules/mongoose/node_modules/mongodb/lib/server.js:242
cloudboost-user-service_1 | process.nextTick(function() { throw err; })
cloudboost-user-service_1 | ^
cloudboost-user-service_1 | Error: getaddrinfo ENOTFOUND _GLOBAL _GLOBAL:27017
cloudboost-user-service_1 | at errnoException (dns.js:26:10)
cloudboost-user-service_1 | at GetAddrInfoReqWrap.onlookup as oncomplete

cloudboost-user-service_1 | npm info lifecycle [email protected]~start: Failed to exec start script
cloudboost-user-service_1 | npm ERR! Linux 3.10.0-327.22.2.el7.x86_64
cloudboost-user-service_1 | npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
cloudboost-user-service_1 | npm ERR! node v5.6.0
cloudboost-user-service_1 | npm ERR! npm v3.6.0
cloudboost-user-service_1 | npm ERR! code ELIFECYCLE
cloudboost-user-service_1 | npm ERR! [email protected] start: node server.js
cloudboost-user-service_1 | npm ERR! Exit status 1
cloudboost-user-service_1 | npm ERR!
cloudboost-user-service_1 | npm ERR! Failed at the [email protected] start script 'node server.js'.
cloudboost-user-service_1 | npm ERR! Make sure you have the latest version of node.js and npm installed.
cloudboost-user-service_1 | npm ERR! If you do, this is most likely a problem with the CbFrontendServices package,
cloudboost-user-service_1 | npm ERR! not with npm itself.
cloudboost-user-service_1 | npm ERR! Tell the author that this fails on your system:
cloudboost-user-service_1 | npm ERR! node server.js
cloudboost-user-service_1 | npm ERR! You can get information on how to open an issue for this project with:
cloudboost-user-service_1 | npm ERR! npm bugs CbFrontendServices
cloudboost-user-service_1 | npm ERR! Or if that isn't available, you can get their info via:
cloudboost-user-service_1 | npm ERR! npm owner ls CbFrontendServices
cloudboost-user-service_1 | npm ERR! There is likely additional logging output above.
cloudboost-user-service_1 |
cloudboost-user-service_1 | npm ERR! Please include the following file with any support request:
cloudboost-user-service_1 | npm ERR! /usr/src/app/npm-debug.log
`

Running Cloudboost on a Mac

Is it possible to run Cloudboost.io on a Mac using docker compose? If so, can you please provide some instructions on how to do it.

Questions of ports

After you change the file docker-compose.yml, the server can't run. Error : Bind for 0.0.0.0:4730 failed: port is already allocated. I delete the 4730๏ผš80 in the docker-compose.yml ,it can run normally.

Err_connection_refued localhost 1447

When I am starting up compose I get this error
cloudboost-user-service_1 | Check is hosted..
cloudboost-user-service_1 | Success on Check is hosted..
cloudboost-user-service_1 | Successfull isHosted server check
cloudboost-user-service_1 | Get app List
cloudboost-user-service_1 | Unauthorised on Get app List

When accessing through the browser localhost:80 it forward me over to http://localhost:1447/
and I get access unauthorized

some questions of API

How can I get the API of creating tables of an APP in docker? I can create an APP with curl ,but i can't find the way to create tables in the APP I create recently. Help!!!

Unexpected end of JSON input

Hello !
I get the following error when trying to docker-compose up
Host OS: Windows 10 Enterprise
Docker Linux Container

> docker version

Client:
 Version:      17.06.2-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   cec0b72
 Built:        Tue Sep  5 19:57:19 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.06.2-ce
 API version:  1.30 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   cec0b72
 Built:        Tue Sep  5 19:59:19 2017
 OS/Arch:      linux/amd64
 Experimental: true
> docker images -a

REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE
nginx                   latest              66216d141be6        2 days ago          108MB
mongo                   3.4                 917819fa18fd        2 days ago          359MB
cloudboost/cloudboost   latest              289a51bf4b69        2 days ago          826MB
ubuntu                  latest              ccc7a11d65b1        4 weeks ago         120MB
redis                   3.0                 c44fa74ead88        2 months ago        91.6MB
hello-world             latest              1815c82652c0        2 months ago        1.84kB
Cluster Key : 3439b923-9fa4-440a-8563-9ddf34a16b44
Secure Key : 0c10fa9b-1fb2-4dc9-9a14-c7189072a9e8
Registering Cluster...
Cluster registration failed.
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Request._callback (/usr/src/app/services/server.js:84:31)
    at Request.self.callback (/usr/src/app/node_modules/request/request.js:188:22)
    at emitTwo (events.js:125:13)
    at Request.emit (events.js:213:7)
    at Request.<anonymous> (/usr/src/app/node_modules/request/request.js:1171:10)
    at emitOne (events.js:115:13)
    at Request.emit (events.js:210:7)
    at IncomingMessage.<anonymous> (/usr/src/app/node_modules/request/request.js:1091:12)
    at Object.onceWrapper (events.js:314:30)
    at emitNone (events.js:110:20)
    at IncomingMessage.emit (events.js:207:7)
    at endReadableNT (_stream_readable.js:1045:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

Server not starting

For a strange reason after I do visit the IP address it shows a 200 status. {"status":200,"version":"1.0.23"}

But the cluster key and secret key provided cannot be used in a POST request to create an app. It gives me the "Unauthorized" status.

If you look into the logs right before haproxy it says:

Registering Cluster...
cloudboost_1    | Cluster registration failed.
cloudboost_1    | { [Error: connect ECONNREFUSED 127.0.0.1:5555]
cloudboost_1    |   code: 'ECONNREFUSED',
cloudboost_1    |   errno: 'ECONNREFUSED',
cloudboost_1    |   syscall: 'connect',
cloudboost_1    |   address: '127.0.0.1',
cloudboost_1    |   port: 5555 }

https://gist.github.com/blacksector/fbc5d06cd2d1315c0caa

Cluster key is not showing up

There is no cluster key after running sudo docker-compose up. The cluster key shows up in cloudboost/cloudboost repo but not here.

Missing config for haproxy

When launching the stack with docker-compose, the haproxy container exits almost immediately. "docker logs" on the haproxy container shows:

[ALERT] 018/225540 (1) : Could not open configuration file /usr/local/etc/haproxy/haproxy.cfg : No such file or directory

Switching to a more complete haproxy image such as tutum's results in a working container:

#Load Balancer.
lb:
  image: tutum/haproxy:latest
  links:
  - cloudboost
  ports:
  - "80:80"
  environment:
  - BACKEND_PORT=4730
  - BALANCE=roundrobin

Documentation for API needed

I see that the readme includes information on how to create/delete an app. However, where should users of the CloudBoost docker container find information on how to create things like tables and columns. When using the CloudBoost container, where is the js-sdk supposed to come from, is it served from the container? Is the CloudBoost user-interface available from the container?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.