Skip to content

Instantly share code, notes, and snippets.

@vinicius73
Last active May 11, 2018 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vinicius73/6661b6af86c8e1f851c2f8ebc1a9c7a1 to your computer and use it in GitHub Desktop.
Save vinicius73/6661b6af86c8e1f851c2f8ebc1a9c7a1 to your computer and use it in GitHub Desktop.
Node + PostgreSQL
version: '3'
postgres:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: password
POSTGRES_USER: goku
services:
api:
build: "."
container_name: "api"
working_dir: /home/node/app
links:
- postgres
environment:
- NODE_ENV=development
volumes:
- ./:/home/node/app
ports:
- 8081:8081
expose:
- "8081"
command: "yarn run dev"
tty: true
FROM node:8.9-alpine
RUN npm install --global yarn && \
yarn global add pm2 && \
yarn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment