FROM node:10
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install && npm rebuild bcrypt --build-from-source
EXPOSE 3000
CMD ["npm", "start"]
and
version: "3.7"
services:
db:
container_name: postgres_screencapdic_db
image: postgres
restart: always
environment:
POSTGRES_USER: cclee11111
POSTGRES_PASSWORD: cclee11111
POSTGRES_DB: screencapdb
volumes:
- screencapdb:/var/lib/postgresql/data
ports:
- "5432:5432"
# screencap_api:
# build:
# context: ./
# dockerfile: Dockerfile-screepcap-express
# container_name: screencap_api
# restart: always
# ports:
# - "8080:3000"
# volumes:
# - type: bind
# source: ./
# target: /usr/src/app
# - /usr/src/app/node_modules
volumes:
screencapdb: