Skip to content

Commit e7e8597

Browse files
authored
Merge pull request #42 from r-spacex/nodejs-option
Node.js platform migration
2 parents f71063e + 83a34df commit e7e8597

33 files changed

+4257
-965
lines changed

.docker-compose.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
npm-debug.log

.eslintrc.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"env": {
3+
"es6": true,
4+
"node": true,
5+
"jest": true
6+
},
7+
"extends": "eslint:recommended",
8+
"parserOptions": {
9+
"sourceType": "module"
10+
},
11+
"rules": {
12+
"no-console":0,
13+
"indent": [
14+
"error",
15+
2
16+
],
17+
"linebreak-style": [
18+
"error",
19+
"unix"
20+
],
21+
"quotes": [
22+
"error",
23+
"double"
24+
],
25+
"semi": [
26+
"error",
27+
"never"
28+
]
29+
}
30+
}

.gitignore

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,62 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (http://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# Typescript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+
160
# General
261
*.DS_Store
362
.AppleDouble

.travis.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
language: ruby
2-
sudo: false
3-
dist: trusty
4-
cache: bundler
1+
language: node_js
2+
node_js:
3+
- "node"
4+
cache:
5+
directories:
6+
- "node_modules"
57
notifications:
68
email:
79
on_success: never
810
on_failure: always
9-
slack:
10-
secure: YCLQ9AqOPR4cnB+v9d+O6eX31IWDL43GyFcgHRCoUbfsccJoguo0vHqjzd36VdE+bp3PD9GJTEdiiDJGCPgQyq3vUP9VhiR4xbLdNSGth6+7Q0wZdoRHkG0qjXKgcFtEnAmjwgadHQ3Ymh9krZvzRlee5B92lPh2oocU1Lijw9Vw4e6cIco+Fr3Pjnx3eY1rSVUd45qv7bnzxHCT+my4lMcqgJXd9/OIHVL+RCigGcKeBSR7V79Fi/4fg7+e1fwaiwZKpRfF4cOtQ30K/x0M07Sbv01OHbn8CybUw1uax+6s+8nJXPCyWymxONexy54n/uMCAqr6ODNlKvJdeP0KqY+n3l913JCFZKVYfM6roxC70Mn4ZmT670Kxlc1ROLxmgruSTk5Cr3Pv+rSpC1F7p1Fv7gUi+Aia2uZec2n4gPmq482psubkRORW9f5aAtAQMzkdHYg8hs3QA0/XShpm+eksK6+/DAFP/eXQVNyDQysJlp7SD/GFjmusKIa4tJqD+jjWOFXtojyY7vT1RFIrMtUPAz4s5LMPLWiS4p0H6KCcJ3GpYEuZm5i4TJtQInec4lIgj/JLUSueIZy/kD+jY+nBXEzCyZPi1YFU/yQmx4+tBknKWJvQpFXI542bg7qEWD9IZUpGfIByRUVQvCo0xuhA/pCOVH8HQO0xTkBrPb0=
1111
after_success:
12-
- ./scripts/docker_build.sh
12+
- ./scripts/docker_build.sh
13+

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ Changes will not be merged unless the build passes.
1313
4. If the build succeeds, the pull request will be merged, and automatically
1414
pushed to the staging server at [http://stage.spacexdata.com/v1/](http://stage.spacexdata.com/v1/) for a
1515
final check before promoting changes to production at [https://api.spacexdata.com/v1/](https://api.spacexdata.com/v1/).
16-

Dockerfile

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
1-
# Dockerfile with alpine based build
2-
3-
FROM ruby:2.4.1-alpine
1+
FROM node:alpine
42

53
MAINTAINER Jake Meyer <[email protected]>
64

7-
RUN apk update && apk upgrade
8-
RUN apk add --update alpine-sdk
9-
RUN apk add ruby-bundler
10-
11-
WORKDIR /app
12-
ADD Gemfile /app/Gemfile
13-
ADD Gemfile.lock /app/Gemfile.lock
14-
RUN bundle install --system
5+
ENV NODE_ENV=production
156

16-
ADD . /app
17-
RUN bundle install --system
7+
RUN mkdir -p /home/nodejs/app
8+
WORKDIR /home/nodejs/app
189

19-
EXPOSE 9292
10+
COPY . /home/nodejs/app
11+
RUN npm install --production
2012

21-
CMD ["bundle", "exec", "puma", "-e", "production"]
13+
EXPOSE 5000
14+
CMD [ "npm", "start" ]

Gemfile

Lines changed: 0 additions & 14 deletions
This file was deleted.

Gemfile.lock

Lines changed: 0 additions & 72 deletions
This file was deleted.

Procfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
web: bundle exec puma -p $PORT -e production
1+
web: npm start

0 commit comments

Comments
 (0)