Skip to content

Commit

Permalink
Merge pull request #27 from MarinaMcGrath/docker
Browse files Browse the repository at this point in the history
add Dockerfile
  • Loading branch information
nihonjinrxs committed Sep 23, 2017
2 parents 9dba4ec + 8b35139 commit 12c6ab7
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
data/nola311_raw.csv
app/package-lock.json
env/*
3 changes: 3 additions & 0 deletions app/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
npm-debug-log
.env
7 changes: 7 additions & 0 deletions app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node
WORKDIR /usr/src/app
COPY package.json .
RUN npm install
COPY . .
EXPOSE 3000
CMD "./startapp.sh"
13 changes: 13 additions & 0 deletions app/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: "2"
services:
server:
build:
context: '.'
environment:
- NOLA311_DB_USER
- NOLA311_DB_NAME
- NOLA311_DB_HOST
- NOLA311_DB_PORT
- NOLA311_DB_PASSWORD
ports:
- 3000:3000
4 changes: 4 additions & 0 deletions app/startapp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

DATABASE_URL="postgresql:https://$NOLA311_DB_USER:$NOLA311_DB_PASSWORD@$NOLA311_DB_HOST:$NOLA311_DB_PORT/$NOLA311_DB_NAME" \
npm start

0 comments on commit 12c6ab7

Please sign in to comment.