Skip to content
Open
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
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/node_modules
/dist/
node_modules
dist/

# Ignore snapchat
src/__tests__/**/__snapshots__

.node-version
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
FROM node:12.13.0-alpine

# make application directory
WORKDIR /app
WORKDIR /usr/app

ENV PATH /app/node_modules/.bin:$PATH
ENV PATH /usr/app/node_modules/.bin:$PATH

# copy pakcage.json to resolve dependency
COPY package.json /app/package.json
COPY package.json /usr/app/package.json
RUN npm install

# copy source of app
COPY . /app
COPY . /usr/app

# expose port of container to host machine
# EXPOSE 4000
EXPOSE 4000
EXPOSE 6006

CMD ["npm", "run", "watch"]
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ services:
context: .
dockerfile: Dockerfile
volumes:
- .:/app
- /app/node_modules
- ./:/usr/app
- /usr/app/node_modules
ports:
- 4000:4000
- 6006:6006
Expand Down
Loading