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
7 changes: 7 additions & 0 deletions app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM mhart/alpine-node:8.11.4
WORKDIR /app
COPY package*.json /app/
RUN npm install
COPY . /app/
EXPOSE 3000
CMD ["npm", "start"]
40 changes: 40 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: "1"
services:
api:
image: webapp-api
restart: always
ports:
- "9000:9000"
volumes:
- ./api:/api
- /api/node_modules
depends_on:
- mongodb
networks:
- webappnetwork
client:
image: webapp-client
restart: always
ports:
- "3000:3000"
volumes:
- ./client:/client
- /client/node_modules
links:
- api
networks:
- webappnetwork
mongodb:
image: mongo
restart: always
container_name: mongodb
volumes:
- ./data-node:/data/db
ports:
- 27017:27017
command: mongod --noauth --smallfiles
networks:
- webappnetwork
networks:
webappnetwork:
driver: bridge
7 changes: 7 additions & 0 deletions server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM mhart/alpine-node:8.11.4
WORKDIR /api
COPY package*.json /api/
RUN npm install
COPY . /api/
EXPOSE 3030
CMD ["npm", "start-server"]