This repository has been archived by the owner on Aug 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2k
Support Deploying MEANJS To Cloud Foundry #681
Closed
Closed
Changes from 5 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
79d92b8
Cherry picked commit 2b4d859 from #239
ryanjbaxter 6cc0dda
Cherry picked 49710ef from #239
ryanjbaxter 2b0f310
Fixed JSHint issues
ryanjbaxter fcb8d3d
Updates based on changes in the 0.4.0 branch
ryanjbaxter af191f1
Switched sandbox flag on PayPal integration to be false since a deplo…
ryanjbaxter 60e0f7b
Moved CloudFoundry instructions
ryanjbaxter 3617ed3
Support to easily deploy MEANJS to Cloud Foundry
ryanjbaxter b9a10c3
Merge branch '0.4.0' of https://github.com/ryanjbaxter/mean into 0.4.0
ryanjbaxter 14191b3
Merge remote-tracking branch 'Upstream/0.4.0' into 0.4.0
ryanjbaxter 85a1255
Removed unnecessary CF documentation
ryanjbaxter d6c5e6d
Merge remote-tracking branch 'Upstream/0.4.0' into 0.4.0
ryanjbaxter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# List of files and directories to ignore when deploying to Cloud Foundry | ||
.DS_Store | ||
.nodemonignore | ||
.sass-cache/ | ||
npm-debug.log | ||
node_modules/ | ||
public/lib | ||
app/tests/coverage/ | ||
.bower-*/ | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
client: { | ||
lib: { | ||
css: [ | ||
'public/lib/bootstrap/dist/css/bootstrap.min.css', | ||
'public/lib/bootstrap/dist/css/bootstrap-theme.min.css', | ||
], | ||
js: [ | ||
'public/lib/angular/angular.min.js', | ||
'public/lib/angular-resource/angular-resource.min.js', | ||
'public/lib/angular-animate/angular-animate.min.js', | ||
'public/lib/angular-ui-router/release/angular-ui-router.min.js', | ||
'public/lib/angular-ui-utils/ui-utils.min.js', | ||
'public/lib/angular-bootstrap/ui-bootstrap-tpls.min.js', | ||
'public/lib/angular-file-upload/angular-file-upload.min.js' | ||
] | ||
}, | ||
css: 'public/dist/application.min.css', | ||
js: 'public/dist/application.min.js' | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
'use strict'; | ||
|
||
var cfenv = require('cfenv'), | ||
appEnv = cfenv.getAppEnv(), | ||
cfMongoUrl = appEnv.getService('mean-mongo') ? | ||
appEnv.getService('mean-mongo').credentials.uri : undefined; | ||
|
||
var getCred = function(serviceName, credProp) { | ||
return appEnv.getService(serviceName) ? | ||
appEnv.getService(serviceName).credentials[credProp] : undefined; | ||
}; | ||
|
||
module.exports = { | ||
port: appEnv.port, | ||
db: { | ||
uri: cfMongoUrl, | ||
options: { | ||
user: '', | ||
pass: '' | ||
} | ||
}, | ||
log: { | ||
// Can specify one of 'combined', 'common', 'dev', 'short', 'tiny' | ||
format: 'combined', | ||
// Stream defaults to process.stdout | ||
// By default we want logs to go to process.out so the Cloud Foundry Loggregator will collect them | ||
options: { | ||
} | ||
}, | ||
facebook: { | ||
clientID: getCred('mean-facebook', 'id') || 'APP_ID', | ||
clientSecret: getCred('mean-facebook', 'secret') || 'APP_SECRET', | ||
callbackURL: '/api/auth/facebook/callback' | ||
}, | ||
twitter: { | ||
clientID: getCred('mean-twitter', 'key') || 'CONSUMER_KEY', | ||
clientSecret: getCred('mean-twitter', 'secret') || 'CONSUMER_SECRET', | ||
callbackURL: '/api/auth/twitter/callback' | ||
}, | ||
google: { | ||
clientID: getCred('mean-google', 'id') || 'APP_ID', | ||
clientSecret: getCred('mean-google', 'secret') || 'APP_SECRET', | ||
callbackURL: '/api/auth/google/callback' | ||
}, | ||
linkedin: { | ||
clientID: getCred('mean-linkedin', 'id') || 'APP_ID', | ||
clientSecret: getCred('mean-linkedin', 'secret') || 'APP_SECRET', | ||
callbackURL: '/api/auth/linkedin/callback' | ||
}, | ||
github: { | ||
clientID: getCred('mean-github', 'id') || 'APP_ID', | ||
clientSecret: getCred('mean-github', 'secret') || 'APP_SECRET', | ||
callbackURL: '/api/auth/github/callback' | ||
}, | ||
paypal: { | ||
clientID: getCred('mean-paypal', 'id') || 'CLIENT_ID', | ||
clientSecret: getCred('mean-paypal', 'secret') || 'CLIENT_SECRET', | ||
callbackURL: '/api/auth/paypal/callback', | ||
sandbox: false | ||
}, | ||
mailer: { | ||
from: getCred('mean-mail', 'from') || 'MAILER_FROM', | ||
options: { | ||
service: getCred('mean-mail', 'service') || 'MAILER_SERVICE_PROVIDER', | ||
auth: { | ||
user: getCred('mean-mail', 'username') || 'MAILER_EMAIL_ID', | ||
pass: getCred('mean-mail', 'password') || 'MAILER_PASSWORD' | ||
} | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
applications: | ||
- name: mean | ||
host: mean-${random-word} | ||
memory: 128M | ||
services: | ||
- mean-mongo | ||
env: | ||
NODE_ENV: cloud-foundry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think up until line 188 the info is ok, but beyond it's quite specific to the CF configuration and that's not the place to put it. I suggest that we try one of:
Also please place the CF README section in the bottom part and definitely not before the core MEANJS items like Getting Started area.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a barebone structure right now for the documentation:
https://github.com/meanjs/mean/blob/gh-pages/_includes/docs/0.4.x/overview.html
If you make another file with that structure with instructions on Deploying to CloudFoundry, I will get the link worked out in the documentation for it to show up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codydaig is it best to create a separate pull request for that branch with the documentation in it?