Skip to content
This repository has been archived by the owner on Nov 14, 2019. It is now read-only.

Commit

Permalink
update docker stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
mgwalker committed Sep 24, 2017
1 parent 7675f66 commit e352cca
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 27 deletions.
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:6

RUN yarn global add npm@5

RUN mkdir /app
WORKDIR /app

ADD ./package.json .

RUN npm install

CMD npm run start
45 changes: 21 additions & 24 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
slackbot:
image: node:6
entrypoint: /app/entrypoint.sh
environment:
- DATABASE_URL=postgres://postgres:standup@database/standup
- PORT=3000
- LOG_LEVEL=10
expose:
- 3000
ports:
- 3000
working_dir: /app
volumes:
- ./:/app
- /app/node_modules
links:
- database:database
database:
image: postgres:latest
environment:
- POSTGRES_DB=standup
- POSTGRES_PASSWORD=standup
expose:
- 5432
version: "2"
services:
database:
image: postgres:latest
environment:
- POSTGRES_DB=standup
- POSTGRES_PASSWORD=standup
expose:
- 5432
standup-bot:
build: .
entrypoint: /app/entrypoint.sh
environment:
- DATABASE_URL=postgres://postgres:standup@database/standup
- PORT=3000
- LOG_LEVEL=10
ports:
- 3000
volumes:
- ./:/app
- /app/node_modules
5 changes: 2 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#!/bin/bash
npm install && \
./wait-for-it.sh -s -q -t 0 database:5432 -- npm start
#!/usr/bin/env bash
./wait-for-it.sh -s -q -t 0 database:5432 -- npm start

0 comments on commit e352cca

Please sign in to comment.