Subramanya Sastry has submitted this change and it was merged.
Change subject: Allow parsoid to be easily deployed to appfog.
......................................................................
Allow parsoid to be easily deployed to appfog.
For new contributors or third-party users, appfog.com can be an easy
way to deploy a parsoid instance. To support this use, we:
* Bind server to proper port for AppFog deployment
* Add 'npm start' command (AppFog uses the 'start' script to figure out
how to run our app.)
* Add a manifest.yml describing parsoid.
Change-Id: Ieebd9b5c937a2b0a8e9d43e071acf346bf24b6c6
---
A js/.afignore
M js/api/server.js
A js/manifest.yml
M js/package.json
4 files changed, 27 insertions(+), 1 deletion(-)
Approvals:
Subramanya Sastry: Verified; Looks good to me, approved
diff --git a/js/.afignore b/js/.afignore
new file mode 100644
index 0000000..0048007
--- /dev/null
+++ b/js/.afignore
@@ -0,0 +1,5 @@
+*~
+api/nohup.out
+api/npm-debug.log
+#*
+.#*
diff --git a/js/api/server.js b/js/api/server.js
index 09de457..e2748f0 100644
--- a/js/api/server.js
+++ b/js/api/server.js
@@ -39,5 +39,7 @@
console.log('Worker shutting down');
process.exit(1);
});
- app.listen(8000);
+ // when running on appfog.com the listen port for the app
+ // is passed in an environment variable. Most users can ignore this!
+ app.listen(process.env.VCAP_APP_PORT || 8000);
}
diff --git a/js/manifest.yml b/js/manifest.yml
new file mode 100644
index 0000000..806ccba
--- /dev/null
+++ b/js/manifest.yml
@@ -0,0 +1,18 @@
+# AppFog.com configuration for parsoid
+# (useful if you want to deploy your own parsoid instance in the cloud)
+---
+applications:
+ .:
+ name: parsoid
+ framework:
+ name: standalone
+ info:
+ mem: 64M
+ description: Standalone Application
+ exec:
+ runtime: node08
+ command: npm run start
+ infra: aws
+ url:
+ mem: 1G
+ instances: 1
diff --git a/js/package.json b/js/package.json
index 953405f..1e54566 100644
--- a/js/package.json
+++ b/js/package.json
@@ -23,6 +23,7 @@
},
"main": "mediawiki.parser.js",
"scripts": {
+ "start": "node api/server.js",
"pretest": "node tests/fetch-parserTests.txt.js",
"test": "node tests/parserTests.js"
}
--
To view, visit https://gerrit.wikimedia.org/r/57400
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ieebd9b5c937a2b0a8e9d43e071acf346bf24b6c6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits