{"action":"created","issue":{"url":"https://api.github.com/repos/dokku/dokku/issues/1737","labels_url":"https://api.github.com/repos/dokku/dokku/issues/1737/labels{/name}","comments_url":"https://api.github.com/repos/dokku/dokku/issues/1737/comments","events_url":"https://api.github.com/repos/dokku/dokku/issues/1737/events","html_url":"https://github.com/dokku/dokku/issues/1737","id":119972441,"number":1737,"title":"config:set doesn't allow double-quotes / providing meteor settings.json file","user":{"login":"JarnoLeConte","id":279767,"avatar_url":"https://avatars.githubusercontent.com/u/279767?v=3","gravatar_id":"","url":"https://api.github.com/users/JarnoLeConte","html_url":"https://github.com/JarnoLeConte","followers_url":"https://api.github.com/users/JarnoLeConte/followers","following_url":"https://api.github.com/users/JarnoLeConte/following{/other_user}","gists_url":"https://api.github.com/users/JarnoLeConte/gists{/gist_id}","starred_url":"https://api.github.com/users/JarnoLeConte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JarnoLeConte/subscriptions","organizations_url":"https://api.github.com/users/JarnoLeConte/orgs","repos_url":"https://api.github.com/users/JarnoLeConte/repos","events_url":"https://api.github.com/users/JarnoLeConte/events{/privacy}","received_events_url":"https://api.github.com/users/JarnoLeConte/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dokku/dokku/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-12-02T15:53:07Z","updated_at":"2015-12-21T22:46:26Z","closed_at":null,"body":"In try to deploy a [meteor app](https://www.meteor.com) providing a **settings.json** file.\r\n\r\nTherefore we need to put the content of settings.json in an **environment variable**. This can be done this way, *where it seems the double quote escaping is required by `dokku_client.sh`*\r\n```\r\n$ dokku config:set <app> METEOR_SETTINGS=\"'$(cat ./settings.json | sed \"s/\\\"/\\\\\\\"/g\")'\"\r\n```\r\n\r\n\r\nSo far so good I think ...\r\n\r\n*2 observations*:\r\n1. Deployment of an app **fails**, because the building process don't handle the double quotes correctly.\r\n2. But deployment without METEOR_SETTINGS and set this variable afterwards, **succeed**.\r\n\r\nSo it's the building process that don't handles the double quotes correctly. But in the second case, when calling `dokku ps:rebuild` the build will fail again. \r\n\r\nI get the following error, where it seems the double quotes are missing:\r\n```\r\n$ dokku ps:rebuild myapp\r\n-----> Cleaning up...\r\n-----> Building myapp from herokuish...\r\n-----> Adding BUILD_ENV to build environment...\r\n-----> Fetching custom buildpack\r\n-----> Node.js app detected\r\n-----> Installing node\r\n-----> Installing meteor\r\nDownloading Meteor distribution\r\n######################################################################## 100.0%\r\n-----> Bundling bundle\r\n-----> Building Meteor with ROOT_URL: http://myapp.mydokku.me\r\nErrors prevented isopacket load:\r\n\r\nWhile loading isopacket `constraint-solver`:\r\npackages/meteor/server_environment.js:13:1: METEOR_SETTINGS are not valid JSON:\r\n{env: production, wait: 5 }\r\nat packages/meteor/server_environment.js:13:1\r\nat <runJavaScript-2>:50:4\r\nat <runJavaScript-2>:1274:3\r\n\r\n\r\n\r\n/tmp/buildpacks/custom/meteor-qKra/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/future.js:278\r\n\t\t\t\t\t\tthrow(ex);\r\n\t\t\t\t\t\t      ^\r\n```\r\n\r\nI used the [meteor-buildpack-horse](https://github.com/AdmitHub/meteor-buildpack-horse) buildpack. I'm not sure if the buildpack or Dokku is responsible for the build error?!\r\n\r\nMy questions:\r\n- What do I wrong by providing the settings.json file this way? \r\n- Are there other ways to accomplish this task? \r\n- Maybe it's a bug in the building process that could be fixed? "},"comment":{"url":"https://api.github.com/repos/dokku/dokku/issues/comments/166444825","html_url":"https://github.com/dokku/dokku/issues/1737#issuecomment-166444825","issue_url":"https://api.github.com/repos/dokku/dokku/issues/1737","id":166444825,"user":{"login":"josegonzalez","id":65675,"avatar_url":"https://avatars.githubusercontent.com/u/65675?v=3","gravatar_id":"","url":"https://api.github.com/users/josegonzalez","html_url":"https://github.com/josegonzalez","followers_url":"https://api.github.com/users/josegonzalez/followers","following_url":"https://api.github.com/users/josegonzalez/following{/other_user}","gists_url":"https://api.github.com/users/josegonzalez/gists{/gist_id}","starred_url":"https://api.github.com/users/josegonzalez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josegonzalez/subscriptions","organizations_url":"https://api.github.com/users/josegonzalez/orgs","repos_url":"https://api.github.com/users/josegonzalez/repos","events_url":"https://api.github.com/users/josegonzalez/events{/privacy}","received_events_url":"https://api.github.com/users/josegonzalez/received_events","type":"User","site_admin":false},"created_at":"2015-12-21T22:46:26Z","updated_at":"2015-12-21T22:46:26Z","body":"@michaelshobbs one hack I just thought of.\r\n\r\nWhat if we base64-encode all commands locally before sending them over ssh, and then executing them base64-decoded on the other side?"}}