diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e4e479d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: node_js -dist: trusty -sudo: false -node_js: - - '10' -services: - - postgresql -addons: - postgresql: "9.6" - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-4.8 -before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.9.4 - - export PATH=$HOME/.yarn/bin:$PATH -before_script: - - psql -c "create database testing;" -U postgres -env: - global: - - DATABASE_URL="postgres://postgres@localhost:5432/testing" diff --git a/README.md b/README.md index f172c8f..2fc67d9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ # EC2 Manager -[![Build Status](https://travis-ci.org/taskcluster/ec2-manager.svg?branch=master)](https://travis-ci.org/taskcluster/ec2-manager) Track, manage and alter the state of an EC2 account with a focus on spot requests. The application understands EC2 regions, instances and pools of instances. It does not understand Taskcluster Provisioning specifics like diff --git a/app.json b/app.json new file mode 100644 index 0000000..0e867f8 --- /dev/null +++ b/app.json @@ -0,0 +1,13 @@ +{ + "environments": { + "test": { + "env": { + "TASKCLUSTER_ROOT_URL": "http://localhost:5555" + }, + "addons":[ + "heroku-postgresql:in-dyno" + ] + } + } +} + diff --git a/lib/main.js b/lib/main.js index 4d2aa56..87938a9 100644 --- a/lib/main.js +++ b/lib/main.js @@ -125,15 +125,6 @@ let load = loader({ }, }, - server: { - requires: ['cfg', 'api'], - setup: ({cfg, api}) => { - let app = App(cfg.server); - app.use('/v1', api); - return app.createServer(); - }, - }, - server: { requires: ['cfg', 'api'], setup: ({cfg, api}) => App({ diff --git a/package.json b/package.json index b80d91e..2f5c958 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "author": "John Ford ", "license": "MPL-2.0", "engines": { - "node": ">=10", - "yarn": ">=1.9.2" + "node": "8.12.0", + "yarn": "1.9.4" }, "scripts": { "heroku-prebuild": "echo $SOURCE_VERSION > .git-version", @@ -35,7 +35,9 @@ "typed-env-config": "^2.0.0", "which": "^1.3.1" }, - "optionalDependencies": {}, + "optionalDependencies": { + "pg-native": "^3.0.0" + }, "devDependencies": { "assume": "^2.1.0", "eslint": "^5.5.0", diff --git a/yarn.lock b/yarn.lock index 092968c..7788dd4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -481,6 +481,10 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" +bindings@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11" + bitsyntax@~0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/bitsyntax/-/bitsyntax-0.0.4.tgz#eb10cc6f82b8c490e3e85698f07e83d46e0cba82" @@ -2332,6 +2336,13 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +libpq@^1.7.0: + version "1.8.8" + resolved "https://registry.yarnpkg.com/libpq/-/libpq-1.8.8.tgz#805005723c15c061185ae5cd8128b6e4174c1810" + dependencies: + bindings "1.2.1" + nan "^2.10.0" + load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" @@ -2903,10 +2914,32 @@ pg-connection-string@0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-0.1.3.tgz#da1847b20940e42ee1492beaf65d49d91b245df7" +pg-int8@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/pg-int8/-/pg-int8-1.0.1.tgz#943bd463bf5b71b4170115f80f8efc9a0c0eb78c" + +pg-native@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pg-native/-/pg-native-3.0.0.tgz#20c64e651e20b28f5c060b3823522d1c8c4429c3" + dependencies: + libpq "^1.7.0" + pg-types "^1.12.1" + readable-stream "1.0.31" + pg-pool@^2.0.3, pg-pool@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-2.0.3.tgz#c022032c8949f312a4f91fb6409ce04076be3257" +pg-types@^1.12.1: + version "1.13.0" + resolved "https://registry.yarnpkg.com/pg-types/-/pg-types-1.13.0.tgz#75f490b8a8abf75f1386ef5ec4455ecf6b345c63" + dependencies: + pg-int8 "1.0.1" + postgres-array "~1.0.0" + postgres-bytea "~1.0.0" + postgres-date "~1.0.0" + postgres-interval "^1.1.0" + pg-types@~1.12.1: version "1.12.1" resolved "https://registry.yarnpkg.com/pg-types/-/pg-types-1.12.1.tgz#d64087e3903b58ffaad279e7595c52208a14c3d2" @@ -3113,6 +3146,15 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" +readable-stream@1.0.31: + version "1.0.31" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.31.tgz#8f2502e0bc9e3b0da1b94520aabb4e2603ecafae" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + "readable-stream@1.x >=1.1.9": version "1.1.14" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"