GithubHelp home page GithubHelp logo

yongjhih / docker-parse-server Goto Github PK

View Code? Open in Web Editor NEW
475.0 27.0 166.0 5.98 MB

Provide docker images and docker stack for parse-server npm versions and latest commit

Home Page: https://hub.docker.com/r/yongjhih/parse-server/

License: Apache License 2.0

JavaScript 67.55% Shell 32.45%

docker-parse-server's Introduction

Docker ❤ Parse

Docker Pulls Docker Stars Docker Tag License Travis CI Gitter Chat

☁️ One-Click Deploy

Deploy Deploy to Azure Deploy to AWS Deploy to Scalingo Deploy to Docker Cloud

⭐ Features

  • Parse Server with MongoDB
  • Parse Cloud Code via git with auto rebuild
  • Parse Push Notification : iOS, Android
  • Parse Live Query
  • Parse Dashboard
  • Tested Docker Image
  • Deploy with Docker
  • Deploy with Docker Compose
  • Deploy with one click
  • GraphQL support GRAPHQL_SUPPORT=true, GRAPHQL_SCHEMA=YOUR_SCHEMA_URL (default to ./cloud/graphql/schema.js)

📺 Overview

Parse Server Diagram

🙈 Sneak Preview

Screencast

🚀 Deployments

Note

📎 Deploy with Docker

$ docker run -d -p 27017:27017 --name mongo mongo

$ docker run -d                                \
             -e APP_ID=${APP_ID}         \
             -e MASTER_KEY=${MASTER_KEY} \
             -p 1337:1337                      \
             --link mongo                      \
             --name parse-server               \
             yongjhih/parse-server

$ docker run -d                                \
             -p 2022:22                        \
             --volumes-from parse-server       \
             --name parse-cloud-code-git       \
             yongjhih/parse-server:git

# Test parse-server
$ curl -X POST \
  -H "X-Parse-Application-Id: {appId}" \
  -H "Content-Type: application/json" \
  -d '{}' \
  http://localhost:1337/parse/functions/hello

$ docker run -d \
             -e APP_ID=${APP_ID}         \
             -e MASTER_KEY=${MASTER_KEY} \
             -e SERVER_URL=http://localhost:1337/parse \
             -p 4040:4040                      \
             --link parse-server               \
             --name parse-dashboard            \
             yongjhih/parse-dashboard

# The above command will asuume you will later create a ssh 
# and log into the dashboard remotely in production. 
#  However, to see the dashboard instanly using either
#  localhost:4040 or someip:4040(if hosted somewhere remotely)
# then you need to add extra option to allowInsecureHTTP like
# It is also required that you create username and password 
# before accessing the portal else you cant get in

$  docker run -d \
        -e PARSE_DASHBOARD_CONFIG='{"apps":[{"appId":"<appid>","serverURL":"http://localhost:1337/parse","masterKey":"<masterkey>","appName":"<appname>"}],"users":[{"user":"<username>","pass":"<password>"}]}' \
        -e PARSE_DASHBOARD_ALLOW_INSECURE_HTTP=1  \
        -p 4040:4040                      \
        --link parse-server               \
        --name parse-dashboard            \
        yongjhih/parse-dashboard

📎 Deploy with Docker Compose

$ wget https://github.com/yongjhih/docker-parse-server/raw/master/docker-compose.yml
$ APP_ID=YOUR_APP_ID MASTER_KEY=YOUR_MASTER_KEY PARSE_DASHBOARD_ALLOW_INSECURE_HTTP=1 SERVER_URL=http://localhost:1337/parse docker-compose up -d

Note

  • We use PARSE_DASHBOARD_ALLOW_INSECURE_HTTP=1 to allow insecure via development environment.
  • $ wget https://github.com/yongjhih/docker-parse-server/raw/master/docker-compose.yml -O - | APP_ID=YOUR_APP_ID MASTER_KEY=YOUR_MASTER_KEY docker-compose up -d -f - # not supported for docker-compose container

📎 Deploy to Cloud Services

⚡ Advance topics

🔥 Server Side Developments

How to push cloud code to server
Screencast - git

# This command wil create a SSH keys for you as
#  ~/.ssh/id_rsa.pub and another private key.
# you can leave the options balnk by pressing enter.

$ ssh-keygen -t rsa

# If git container name is `parse-cloud-code-git`
$ docker exec -i parse-cloud-code-git ssh-add-key < ~/.ssh/id_rsa.pub

# port 2022, repo path is `/parse-cloud-code`
$ git clone ssh://git@localhost:2022/parse-cloud-code
$ cd parse-cloud-code
$ echo "Parse.Cloud.define('hello', function(req, res) { res.success('Hi, git'); });" > main.js
$ git add main.js && git commit -m 'Update main.js'
$ git push origin master

$ curl -X POST \
  -H "X-Parse-Application-Id: ${APP_ID}" \
  -H "Content-Type: application/json" \
  -d '{}' \
  http://localhost:1337/parse/functions/hello

📱 Client Side Developments

You can use the REST API, the JavaScript SDK, and any of our open-source SDKs:

📎 curl example

curl -X POST \
  -H "X-Parse-Application-Id: YOUR_APP_ID" \
  -H "Content-Type: application/json" \
  -d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' \
  http://localhost:1337/parse/classes/GameScore

curl -X POST \
  -H "X-Parse-Application-Id: YOUR_APP_ID" \
  -H "Content-Type: application/json" \
  -d '{}' \
  http://localhost:1337/parse/functions/hello

curl -H "X-Parse-Application-Id: YOUR_APP_ID" \
     -H "X-Parse-Master-Key: YOUR_MASTER_KEY" \
     -H "Content-Type: application/json" \
     http://localhost:1337/parse/serverInfo

📎 JavaScript example

Parse.initialize('YOUR_APP_ID','unused');
Parse.serverURL = 'https://whatever.herokuapp.com';
var obj = new Parse.Object('GameScore');
obj.set('score',1337);
obj.save().then(function(obj) {
  console.log(obj.toJSON());
  var query = new Parse.Query('GameScore');
  query.get(obj.id).then(function(objAgain) {
    console.log(objAgain.toJSON());
  }, function(err) {console.log(err); });
}, function(err) { console.log(err); });

📎 Android example

//in your application class

Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())
        .applicationId("YOUR_APP_ID")
        .clientKey("YOUR_CLIENT_ID")
        .server("http://YOUR_SERVER_URL/parse/")   // '/' important after 'parse'
        .build());

  ParseObject testObject = new ParseObject("TestObject");
  testObject.put("foo", "bar");
  testObject.saveInBackground();

📎 iOS example

class AppDelegate: UIResponder, UIApplicationDelegate {
    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject:AnyObject]?) -> Bool {
        let configuration = ParseClientConfiguration {
            $0.applicationId = "YOUR_APP_ID"
            $0.clientKey = "YOUR_CLIENT_ID"
            $0.server = "http://YOUR_SERVER_URL/parse"
        }
        Parse.initializeWithConfiguration(configuration)
    }
}

📎 GraphQL

Run with GraphQL support.

GRAPHQL_SUPPORT=true APP_ID=YOUR_APP_ID MASTER_KEY=YOUR_MASTER_KEY SERVER_URL=http://localhost:1337/parse docker-compose up -d

Make sure ./cloud/graphql/schema.js is pushed to cloud code.
Then navigate to http://localhost:1337/graphql?query=%7B%0A%20%20hello%0A%7D%0A

👀 See Also

👍 Contributors & Credits

didierfranc ArnaudValensi gerhardsletten acinader kandelvijaya vitaminwater cleever katopz

docker-parse-server's People

Contributors

0zguner avatar abhilash1in avatar chainkite avatar corruptedbuffer avatar drew-gross avatar euklid avatar fabiocav avatar ftomasi avatar gerhardsletten avatar gfosco avatar gitter-badger avatar hellslicer avatar hramos avatar justinbeckwith avatar kandelvijaya avatar katopz avatar magnusja avatar moaazsidat avatar moflo avatar peterdotjs avatar pthongtaem avatar rogerhu avatar rorz avatar ryanlelek avatar vitaminwater avatar vmlinz avatar walkerlee avatar whollacsek avatar yongjhih avatar zeliard91 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  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  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  avatar

Watchers

 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

docker-parse-server's Issues

"Unauthorized" error using docker-compose-le.yml

I'm using the docker-compose-le.yml file to run Parse with Letsencrypt, following the example in the wiki. When I browse to https://my-domain/parse, I see the following JSON in response: {"error":"unauthorized"}. Browsing to https://my-domain properly shows the default nginx greeting "I dream of being a web site.".

Is this an indication of something obvious I've done wrong?

Using Docker 1.10.3 on Ubuntu 16.04.1 x64

When deploying to heroku, mongodb by mlab url is not set to DATABASE_URI

Cause:

When deploying to heroku, mongodb env of mlab is named MONGODB_URI, but the parse server expects url from DATABASE_URI. So users will encounter error access to mongodb from localhost of heroku app, this makes client not able to read or write any data.

Solution:

  1. Manually set DATABASE_URI to content of MONGODB_URI
  2. Try read MONGODB_URI when deploying to heroku

Br,
Nick

CORS support

If you need CORS, take a look at https://gist.github.com/algal/5480916 and add the contents to volumes/proxy/templates/nginx.tmpl in your apropiate section (mine was https server to use it with letsencrypt). Do you think is worth building a complete template to support CORS dynamically by configuration?

Can't connect to parse server (hostname: localhost)

Hello,
I used the docker setup (compose).
all containers are running on a remote server.
I can see the dashboard in my browser . Dashboard is making requests to the server which cannot be contacted, it tries to connect to http://localhost:1337/parse.
Dashboard(my browser) sends requests to localhost where locahost is my laptop, not server where docker containers are running.
Is there any intended way to make it running over the internet where Dashboard is called in Browser which does not run on the same machine as docker containers?

thank you

Tighten up the security

All the ports are open to the outside world.
If you want to run this on Internet facing server make sure to take care of it.

Easiest way is to tell docker to bind ports only to localhost
so instead of
27017:27017
use
127.0.0.1:27017:27017

and make sure your host has a firewall in place.

mongodb fails to start: unrecognised option '--break-mongo'

I used the docker compose to build. MongoDB fails to start:

Attaching to root_mongo-data_1, root_mongo_1, root_parse-cloud-code_1, root_parse-server_1
mongo-data_1       | Error parsing command line: unrecognised option '--break-mongo'
mongo-data_1       | try 'mongod --help' for more information
root_mongo-data_1 exited with code 2

Parse Dashboard Error and Quit

Hi,

I have everything running apart from the parse-dashboard. When i launch it after server start it loads and displays "dashboard.bundle.js:1 Uncaught SyntaxError: Unexpected token <"

After a short time, it then quits. I've tried everything config wise and nothing changes this.

Any thoughts?~

Three problems: Email Adapter, File Upload, GCS config.

Parse Server version: 'yongjhih/parse-server:dev' 2.2.18
Parse Dashboard version: 1.0.18

1st problem: Even though I have configured my domain with Mailgun, and added the email, appname, and public server url variables into docker when starting it up, I still get the error from parse: "An app Name, public Server URL, and emailAdapter are required for password reset functionality."

2nd problem: Can't upload any files from Javascript SDK. Using identical file upload code from documentation.
Error in Chrome: XMLHttpRequest cannot load https://domain.com/parse/files/Photo.jpg. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://domain.com' is therefore not allowed access. The response had HTTP status code 413.

3rd problem: GCP/GCS fileadapter config is also being ignored by docker. File upload in Dashboard goes to gridstore, and in my javascript app I still get the same error as in problem number 2.

Here is my docker config for parse-server:

 docker run -d \
             -e DATABASE_URI=${DATABASE_URI:-mongodb://parse:[email protected]:27017/appname?ssl=true} \
             -e APP_ID=id\
             -e MASTER_KEY=masterkey\
         -e FILE_KEY=filekey  \
         -e APP_NAME=appname\
         -e PUBLIC_SERVER_URL=https://domain.com/parse  \
         -e VERIFY_USER_EMAILS=true\
         -e EMAIL_MODULE=parse-server-simple-mailgun-adapter\
         -e [email protected]\
         -e EMAIL_DOMAIN=domain.com\
         -e EMAIL_API_KEY=key\
         -e GCP_PROJECT_ID=project-000000\
         -e GCP_KEYFILE_PATH=project-000000xxxxxx.json\
         -e GCS_BUCKET=project-storage\
         -e ALLOW_CLIENT_CLASS_CREATION=false\
         -e MAX_UPLOAD_SIZE=100mb\
             -p 127.0.0.1:1337:1337\
             --name parse-server\
             yongjhih/parse-server:dev

Facebook App ID

Not sure if I missed this but would it be possible to add the Facebook App ID to your environmental variables for this image?

How to scale this?

Parse Server Diagram
Maybe sharding Mongo? HAProxy? I'm kinda new to this and just try to make sure that I can scale it later.
So any idea or guides is welcome.

Thanks

Can't run parse-server

parse-server_1 | [nodemon] starting node index.js
parse-server_1 | /parse/node_modules/parse-server/lib/Controllers/AdaptableController.js:58
parse-server_1 | throw new Error(this.constructor.name + " requires an adapter");

Image uploads

I don't see any image upload provisions in the Docker file, what is the best way to bake in local file storage?

Docker compose?

Parse Dashboard bundles/dashboard.bundle.js 404 while letsencrypt enabled

I installed Parse server and Parse Dashboard with latest docker composer image, and letsencript enabled as stated in Advanced.md ,when I access the home page of dashboard, I see 404 for accessing

bundles/dashboard.bundle.js

But if I access this file individually in chrome , it can be opened correctly.

So this isn't chrome blocking it.

I also noticed some similar issues such as this .

Please tell me if this can be corrected.

Thanks.

Error: Cannot find module "parse/cloud/main.js"

Hi yongjhih,
I am trying to set up a project based on Parse Server Example, but I keep getting "Error: Cannot find module 'parse/cloud/main.js'". If I move the main.js out of my cloud folder to the base directory, it is found by the parse server. However, I get an "Error: Cannot find module 'parse-image'" then (that's caused by the first require in my main.js). Seems like it does not understand the example project and does not find package.json. Any ideas on that? Thanks in advance...

NGINX - 502 Bad Gateway - HTTPS Parse Server

I'm receiving 502 error when try to access https://api.mydomain/parse or https://api.mydomain

Dashbord is accessible on https://parse.mydomain/ but with error:

Server not reachable: unable to connect to server

Nginx logs this error:

[error] 8#8: *9 no live upstreams while connecting to upstream, client: ip, server: api.mydomain, request: "GET / HTTP/2.0", upstream: "http://api.mydomain

docker compose is generating the following conf file:

upstream parse.mydomain {
            # dockerparseserver_parse-dashboard_1
            server 172.17.0.8:4040;
}

Perfect

But strange configuration for parse server:

upstream api.mydomain {
        # dockerparseserver_parse-server_1
        server 172.17.0.2 down;
}

Help with docker run for .p12 Certs and APNS

Hello,

After reading the parse docs I see that I need to include the following configuration to get parse server running with certificates.

https://github.com/ParsePlatform/parse-server/wiki/Push

The init looks like this when running this natively:

 var server = new ParseServer({
    databaseURI: '...',
    cloud: '...',
    appId: '...',
    masterKey: '...',
    push: {
      android: {
        senderId: '...',
        apiKey: '...'
      },
      ios: {
        pfx: '/file/path/to/XXX.p12',
        passphrase: '', // optional password to your p12/PFX
        bundleId: '',
        production: false
      }
    }
  });

My question is - how do I pass the IOS configuration array if I have an existing p12 I want to use in a docker container?

I've tried the following by mounting a volume where my p12 cert is located but since the push configuration seems to be an array I'm not sure of the syntax (below generates an error (yes the 'xxxxxx' are substitutes for my actual keys / config values).

 docker run -d \
-v ${PARSE_CLOUD:-/gratitudecloudcode/cloud}:/parse/cloud \
-v /usr/gratitudepushcert:/parse/apnscert \
-e DATABASE_URI=mongodb://xxxxxxxxxxx \
-e APP_ID=xxxxxxx  \
-e MASTER_KEY=xxxxxxx  \
-e FACEBOOK_APP_IDS=xxxxxxxx \
-e FILE_KEY=xxxxxxx
-e PUSH={   \
      ios: {    \
        pfx: '.........Prod-APNS.p12', \
        passphrase: '', \
        bundleId: 'xxxxxxxxx', \
        production: true \
      } \
    } \
-p 1337:1337                                         \
 --name gratitude-parse-server           \
yongjhih/parse-server:dev \

Any help is appreciated.

Andrew

Error: ENOENT: no such file or directory, lstat '/certs/production-pfx'

wget https://github.com/yongjhih/docker-parse-server/raw/master/docker-compose.yml
export APP_ID=myAppId
export MASTER_KEY=myMasterKey
export USER1=admin
export USER1_PASSWORD=parse
export PARSE_DASHBOARD_ALLOW_INSECURE_HTTP=1
docker-compose up -d

But dashboard says "cannot connect to server". Logs on server shows this:

> [email protected] start /parse
> nodemon --watch /parse/cloud index.js

[nodemon] 1.9.2
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: /parse/cloud/**/*
[nodemon] starting `node index.js`
fs.js:976
  return binding.lstat(pathModule._makeLong(path));
                 ^

Error: ENOENT: no such file or directory, lstat '/certs/production-pfx'
    at Error (native)
    at Object.fs.lstatSync (fs.js:976:18)
    at Object.<anonymous> (/parse/index.js:35:9)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Function.Module.runMain (module.js:575:10)
    at startup (node.js:159:18)
[nodemon] app crashed - waiting for file changes before starting...

Where to place .p12 for push notification?

Refer to readme if I want to test push notification I've to add path to .p12 here.

DEV_PFX: $DEV_PFX

So I suppose to upload .p12 somewhere in docker container am I right?
The question is which path? and how? via git? scp? to where? parse-server?
And when it go production, how to secure it?

Thanks

ERROR: for git Conflict. The name "/foo" is already in use by container

When reboot my Mac and I run

$ APP_ID=foo MASTER_KEY=bar docker-compose up -d

I got

Starting katopz_parse-cloud-code_1
Starting katopz_mongo-data_1
Starting katopz_mongo_1
Starting katopz_parse-server_1
Starting katopz_parse-dashboard_1
Creating katopz_git_1

ERROR: for git  Conflict. The name "/katopz_git_1" is already in use by container 408a1f842001b60eb64e0e8e3408dd57588bab8ebbe6570a02675a84029b157c. You have to remove (or rename) that container to be able to reuse that name.

I think it's not quite right because it should Starting instead of Creating there.
So I've to start it manually as workaround for now. Any thought?

Thanks

docker-compose -f docker-compose-le.yml up fail if run twice

If I run
docker-compose -f docker-compose-le.yml up

the first time runs ok.

But if I need to run again, this error occurs:

nginx | 2016/05/12 03:26:09 [emerg] 1#1: open() "/etc/nginx/vhost.d/default" failed (2: No such file or directory) in /etc/nginx/conf.d/default.conf:56 nginx | nginx: [emerg] open() "/etc/nginx/vhost.d/default" failed (2: No such file or directory) in /etc/nginx/conf.d/default.conf:56

And https stops working.

So it's need to delete all containers do work again

with:

docker rm -f $(docker ps -a -q)

Configuring File Adapters

Parse Server allows developers to choose from several options when hosting files.

Would be great if we can configure file adapter with docker composer file.

Dashboard with docker-compose still loading

I use your lastest build of parse-server, with the correction of the issue #22 of the Dashboard.

I use a LetsEncrypt SSL certificate to access via https to the Dashboard (because http is not accessible), and I saw indefinitly the Dashboard loading like this image :

http://goo.gl/UTjcWg

I remove the -d option of docker-compose command line, that's the log I have :

parse-cloud-code_1 | hello.js
parse-cloud-code_1 | main.js
parse-cloud-code_1 | twitch.js
mongo-data_1 | Error parsing command line: unrecognised option '--break-mongo'
mongo-data_1 | try 'mongod --help' for more information
parse-server_1 | npm info it worked if it ends with ok
parse-server_1 | npm info using [email protected]
dockerparse2_mongo-data_1 exited with code 2
dockerparse2_parse-cloud-code_1 exited with code 0
parse-server_1 | npm info using [email protected]
parse-server_1 | npm info lifecycle [email protected]prestart: [email protected]
parse-server_1 | npm info lifecycle [email protected]
start: [email protected]
parse-server_1 |
parse-server_1 | > [email protected] start /parse
parse-server_1 | > nodemon --watch /parse/cloud index.js
parse-server_1 |
parse-dashboard_1 | npm info it worked if it ends with ok
parse-dashboard_1 | npm info using [email protected]
parse-dashboard_1 | npm info using [email protected]
parse-dashboard_1 | npm info lifecycle [email protected]predashboard: [email protected]
parse-dashboard_1 | npm info lifecycle [email protected]
dashboard: [email protected]
parse-dashboard_1 |
parse-dashboard_1 | > [email protected] dashboard /parse-dashboard
parse-dashboard_1 | > node ./Parse-Dashboard/index.js & webpack --config webpack/build.config.js --progress --watch
parse-dashboard_1 |
parse-server_1 | [nodemon] 1.9.1
parse-server_1 | [nodemon] to restart at any time, enter rs
parse-server_1 | [nodemon] watching: /parse/cloud/*/
parse-server_1 | [nodemon] starting node index.js
parse-dashboard_1 | The dashboard is now available at http://localhost:4040/
parse-server_1 | parse-server-example running on http://localhost:1337/parse (:1337/parse) 57% 54/68 build modulesContainer#eachAtRule is deprecated. Use Container#walkAtRules instead.
parse-dashboard_1 | Container#eachRule is deprecated. Use Container#walkRules instead.
parse-dashboard_1 | Container#eachDecl is deprecated. Use Container#walkDecls instead.
parse-dashboard_1 | Node#removeSelf is deprecated. Use Node#remove. 31% 82/231 build modulesNode#before is deprecated. Use NHash: 85303ea680e020d55d40 parse-dashboard_1 | Version: webpack 1.12.14
parse-dashboard_1 | Time: 136083ms
parse-dashboard_1 | Asset Size Chunks Chunk Names
parse-dashboard_1 | img/cf0a48bbd61302f119a4576be8e01ed9.png 652 kB [emitted]
parse-dashboard_1 | dashboard.bundle.js 3.55 MB 0 [emitted] dashboard
parse-dashboard_1 | sprites.svg 99.3 kB [emitted]
parse-dashboard_1 | + 1243 hidden modules

Unauthorized error for cloud code requests which should be called with master key

Hi, I have a problem with calling my cloud code function from REST API.
I trying to do something like this:

curl -X POST -H "X-Parse-Application-Id: MY_APP_NAME" \
>      -H "X-Parse-Master-Key: MY_MASTER_KEY" \
>      -H "Content-Type: application/json" \
>      https://MY_DOMAIN/parse/functions/push

And I sure that APP_NAME MASTER_KEY and DOMAIN are correct.

So for this request parse send me follow response:

{
  "code": 141,
  "error": {
    "message": "unauthorized: master key is required"
  }
}

So seems that some problems on auth functionality

clone error, fatal: protocol error: bad line length character: The

git clone ssh://[email protected]/parse-cloud-code
Cloning into 'parse-cloud-code'...
fatal: protocol error: bad line length character: 
The
ssh -T [email protected] -p 2022                       

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

I change repository URL to [email protected]:2022/parse-cloud-code , no prefix ssh://

git clone [email protected]:2022/parse-cloud-code 

Cloning into 'parse-cloud-code'...
FATAL: R any 2022/parse-cloud-code oblank DENIED by fallthru
(or you mis-spelled the reponame)
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

[dashboard] Cannot use the Master Key, it has not been provided

Hi there,

I wanted to try this docker image(s) and have followed the instructions here: https://github.com/yongjhih/docker-parse-server#paperclip-deploy-with-docker

I get this error after building and opening the dashboard: 'dashboard.bundle.js:9720 Uncaught Error: Cannot use the Master Key, it has not been provided.'

It's kind of strange since I do provide the master key. Does anyone else have this? Thanks!

I'm on a Ubuntu 16.04 64bit-server (digitalocean)

Request : Push Adapter Compose file

Hi, any one know how to set up push adapter with variables in the compose file? I want to use onesignal push adapter instead of apple certs and Google GCM Keys.

Usage with docker-machine

On a mac I had to specify the DATABASE_URI with ip:port to my mongodb docker to make in work:

docker run -d -p 27017:27017 --name mongo mongo
docker run -e APP_ID=secret -e DATABASE_URI=mongodb://192.168.99.100:27017/dev -e MASTER_KEY=super-secret -p 1337:1337 yongjhih/parse-server

2.2.22 is out!

Can you please update package.json and release a new version?

Missing parse-cloud-code-git in docker compose?

Refer from readme If I use...

or with docker-compose:

I think parse-cloud-code-git is never create?
And that will cause...

$ docker exec -i parse-cloud-code-git ssh-add-key < ~/.ssh/id_rsa.pub
Error response from daemon: No such container: parse-cloud-code-git

And I assume from

Starting katopz_parse-cloud-code_1
Starting katopz_mongo-data_1
katopz_mongo_1 is up-to-date
Recreating katopz_parse-server_1
Recreating katopz_parse-dashboard_1
Recreating katopz_git_1

Judge from port 2022 it should be katopz_git_1 so I try...

$ docker exec -i katopz_git_1 ssh-add-key < ~/.ssh/id_rsa.pub
$ git clone ssh://git@localhost:2022/katopz_git_1
Cloning into 'katopz_git_1'...
ssh: connect to host localhost port 2022: Connection refused
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Any hint?

Thanks

Dashboard doesn't work when running docker-compose.yml

I followed the instructions to wget and docker-compose up the docker-compose file

The server, dashboard, and mongo are created successfully.

Server responds successfully when I /functions/hello/ to it.

But the dashboard doesn't work. If I go to localhost:40404/index.view, I get an empty page. Here's the source:

<!DOCTYPE html>
<html>
  <title>Parse Dashboard</title>
  <body>
    <div id="browser_mount"></div>
    <script src="/bundles/dashboard.bundle.js"></script>
  </body>
</html>

Parse Android issue

Hi

Thanks for the awesome docker image. Recently i posted an issue i was having with parse in general on the parseServer page and i got this response yesterday where they said the issue was fixed...

parse-community/parse-server#413

the issue was later advised to be resolved with this git commit...

parse-community/parse-server#679

I've pulled the latest docker image from here and tested but i am still getting error 403 forbidden... not sure if you have updated to the latest push since the issue resolved?

Thanks man!

Why it's always build when restart?

Is it expected behavior?

> [email protected] dashboard /src
> node ./Parse-Dashboard/index.js & webpack --config webpack/build.config.js --progress --watch
The dashboard is now available at http://localhost:4040/
0% compile 10% 0/1 build modules 70% 1/1 build modules 40% 1/2 build modules 30% 1/3 build modules 25% 1/4 build modules 22% 1/5 build modules 34% 2/5
...
Hash: d57a02225cd5793ce3c6
Version: webpack 1.12.15
Time: 40621ms
                                   Asset     Size  Chunks             Chunk Names
img/cf0a48bbd61302f119a4576be8e01ed9.png   652 kB          [emitted]  
                     dashboard.bundle.js  3.56 MB       0  [emitted]  dashboard
                             sprites.svg  99.3 kB          [emitted] 

Refer to webpack --config webpack/build.config.js --progress --watch
And after start localhost I need to wait 40621ms for the build every time I restart even nothing changed.
It's look like config for development for me, Is there any config for production environment there?

Thanks

Why this image not starting automatically?

Hi, Im trying to start your docker image, but its not started. Thats example of my commands:

docker run -d -p 27017:27017 --name mongo mongo
docker run -d -e APP_ID=myappid -e MASTER_KEY=myapppassword -p 1337:1337 --link mongo yongjhih/parse-server

But after that server is not started. And in docker ps -a I see something like that:

6848bbf60604 yongjhih/parse-server "node" 13 seconds ago Exited (0) 12 seconds ago berserk_kowalevski
Where is my error?

Don't run as root

if I can get this all working for me, I'll submit a pr to create a user parse, make all files owned by user parse, and to run the parse server as the user parse.

Mongo data volume

Otherwise data isn't persistent, and committing data changes to the container is not the preferred docker way.

[Feature] GraphQL support

Hey @yongjhih ,

I will need this express-graphql pretty soon, so what do you think?
I can made a PR if you want :)

Actually it's just middleware but the hard part is custom schema which should configurable from outside (maybe read from some volume file)

Do tell me if you have better approach or better way to add GrapgQL support or maybe better way to use any other middleware.

Thanks

Dashboard unable to connect to server

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Dashboard!

  • You're running version >=2.1.4 of Parse Server.
  • You've searched through existing issues. Chances are that your issue has been reported or resolved before.

Environment Setup

I'm running Ubuntu 14.04 with Docker 1.11.2 on a Digital Ocean server.

docker run -d
-e DATABASE_URI=${DATABASE_URI:-xxxx}
-e APP_ID=${APP_ID:-xxxx}
-e MASTER_KEY=${MASTER_KEY:-xxxx}
-e FILE_KEY=${FILE_KEY:-xxxx}
-p 127.0.0.1:1337:1337
--name parse-server
yongjhih/parse-server

docker run -d
-p 127.0.0.1:2022:22
--volumes-from parse-server
--name parse-cloud-code-git
yongjhih/parse-server:git

docker run -d -e PARSE_DASHBOARD_CONFIG='{ "apps": [ { "serverURL": "https://localhost:1337/parse/", "appId": "xxxx, "masterKey": "xxxx", "appName": "xxxx" } ], "users": [ { "user":"Admin", "pass":"Qwerty" } ] }' -p 4040:4040 --link parse-server --name parse-dashboard yongjhih/parse-dashboard

I have parse server, cloud code and dashboard running on localhost as per configuration. I have SSL set up with Lets-Encrypt and my domain is connecting to localhost via an Nginx wrapper.

My Nginx config:

# HTTPS - serve HTML from /usr/share/nginx/html, proxy requests to /parse/
# through to Parse Server
server {
        listen 443;
        server_name xxxx.com;

        root /usr/share/nginx/html;
        index index.html index.htm;

        ssl on;
        # Use certificate and key provided by Let's Encrypt:
        ssl_certificate /etc/letsencrypt/live/xxxx.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/xxxx.com/privkey.pem;
        ssl_session_timeout 5m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
        ssl_ciphers 'xxxx';

        # Pass requests for /parse/ to Parse Server instance at localhost:1337
        location /parse/ {
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-NginX-Proxy true;
                proxy_pass http://localhost:1337/parse/;
                proxy_ssl_session_reuse off;
                proxy_set_header Host $http_host;
                proxy_redirect off;
        }

    location / {
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-NginX-Proxy true;
                proxy_pass http://localhost:4040/;
                proxy_ssl_session_reuse off;
                proxy_set_header Host $http_host;
                proxy_redirect off;
        }
}

Steps to reproduce

My Javascript Parse Web App connects to Parse Server and my MongoDB perfectly. Dashboard is the problem.
Localhost won't even connect, even if I try via HTTP. If I stop securing the ports by removing "127.0.0.1", use the serverURL in the dashboard config as my server's IP "http://xx.xxx.xxx.xx:1337/parse" and add -e PARSE_DASHBOARD_ALLOW_INSECURE_HTTP=1. Then I can connect via HTTP.
However I need to connect via HTTPS. My domain name set up via Nginx won't work either as the server URL option, even though I'm using my domain URL to connect my javascript web app to my parse server.

Please help. Thanks. :)

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.