Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM nodesource/node:6.1.0

ADD package.json package.json

RUN npm install

ADD . .

CMD ["node","app.js"]
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ Node.js Docker Tutorial

So you have Node apps, and you want to use them with Docker. This repository is designed for helping you follow along with our [blog post](https://nodesource.com/blog/dockerizing-your-nodejs-applications/). It will take you from 0 to 60 with Docker and Node.js!

## Run this example

```
docker-compose up
// Watch the logs or run
docker-compose logs myapp

```

## Authors and Contributors

<table><tbody>
Expand Down
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: "2"
services:
db:
image: postgres
myapp:
build: .
links:
- db
environment:
- PGHOST=db
- PGDATABASE=postgres
- PGUSER=postgres