forked from apigee-internal/microgateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nandan Sridhar
committed
May 2, 2017
1 parent
43741a7
commit 7fa9ab9
Showing
3 changed files
with
54 additions
and
2 deletions.
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,16 @@ | ||
'use strict'; | ||
|
||
var run = require('./cli/lib/gateway')(); | ||
const os = require('os'); | ||
|
||
const options = {}; | ||
|
||
options.env = process.env.EDGEMICRO_ENV; | ||
options.key = process.env.EDGEMICRO_KEY; | ||
options.secret = process.env.EDGEMICRO_SECRET; | ||
options.org = process.env.EDGEMICRO_ORG; | ||
options.configDir = process.env.EDGEMICRO_CONFIG_DIR; | ||
options.processes = os.cpus().length; | ||
options.port = process.env.PORT || 8000; | ||
|
||
run.start(options); |
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,31 @@ | ||
# Copyright 2017, Google, 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. | ||
# | ||
# [START runtime] | ||
service: microgateway | ||
runtime: nodejs | ||
env: flex | ||
automatic_scaling: | ||
min_num_instances: 1 | ||
max_num_instances: 2 | ||
resources: | ||
cpu: 1 | ||
memory_gb: 2 | ||
disk_size_gb: 10 | ||
env_variables: | ||
EDGEMICRO_KEY: 'microgateway-key' | ||
EDGEMICRO_SECRET: 'microgateway-secret' | ||
EDGEMICRO_CONFIG_DIR: '/app/config' | ||
EDGEMICRO_ENV: 'env-name' | ||
EDGEMICRO_ORG: 'org-name' | ||
# [END runtime] |
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 |
---|---|---|
|
@@ -51,7 +51,7 @@ | |
} | ||
}, | ||
"scripts": { | ||
"start": "./cli/edgemicro start", | ||
"start": "node app.js", | ||
"package": "node cli/package.js", | ||
"test": "mocha --timeout 17000 tests" | ||
}, | ||
|
@@ -84,5 +84,10 @@ | |
"Matt Dobson <[email protected]> (https://github.com/mdobson)", | ||
"Mitch Fierro <[email protected]> (https://github.com/f1erro)" | ||
], | ||
"author": "Kevin Swiber <[email protected]>" | ||
"author": "Kevin Swiber <[email protected]>", | ||
"engines" : { | ||
"node" : ">= 4.8.2 <=6.9.1", | ||
"npm": ">=3.10.8" | ||
}, | ||
"cpu" : [ "!arm", "!mips" ] | ||
} |