Skip to content

Commit

Permalink
Fix dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagobustamante committed May 16, 2017
1 parent 39a034e commit c05c66d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
19 changes: 12 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

# Install app dependencies
COPY . /usr/src/app/
COPY ./tree-gateway.json /usr/src/app/
COPY ./rest.config /usr/src/app/
COPY ./package.json /usr/src/app/
COPY ./dist /usr/src/app/dist
COPY ./README.md /usr/src/app/

# Compile application
RUN npm --production=false install \
&& npm run-script compile \
&& npm prune --production
# Install dependencies
RUN npm install

EXPOSE 8000
CMD [ "npm", "start" ]
EXPOSE 8000 8001

VOLUME ["/usr/src/app/logs"]

CMD [ "npm", "start"]
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ This is a full featured and free API Gateway in node JS

## Why do I need an API Gateway?

// TODO
An API gateway provides a single, unified API entry point across one or more internal APIs. It is an important element in any microservice architecture.


## Why Tree Gateway?

Expand Down Expand Up @@ -147,7 +148,7 @@ You can also use redis sentinels:
}
```

For more about redis clusters, read [cluster-tutorial](https://redis.io/topics/cluster-tutorial)
For more about redis clusters, read [cluster](https://redis.io/topics/cluster-tutorial) and [sentinel](https://redis.io/topics/sentinel)

You can also inform aditional options for redis connection or use environment variables to configure the databse, like:

Expand Down
2 changes: 1 addition & 1 deletion tree-gateway.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
}
},
"logger": {
"level": "debug",
"level": "info",
"console": {
"colorize": true
},
Expand Down

0 comments on commit c05c66d

Please sign in to comment.