Skip to content

Commit

Permalink
feat: ✨ ready for dockerised run
Browse files Browse the repository at this point in the history
  • Loading branch information
fabricesemti80 committed Jan 24, 2023
1 parent 1cfe086 commit c91d78d
Show file tree
Hide file tree
Showing 6 changed files with 1,141 additions and 1,227 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:14-slim

# set working directory
WORKDIR /usr/src/app

# copy node files
COPY ./package*.json ./

# install npm modules
RUN npm install

COPY . .

USER node

EXPOSE 3000

CMD [ "npm","start" ]
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
run-local:
docker-compose up
33 changes: 33 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: '3'

services:

api-server:
build: ./
env_file:
- ./config/config.env
ports:
- "3000:3000"
networks:
- storybooks-app
depends_on:
- mongo

mongo:
image: mongo:3.6-xenial
environment:
- MONGO_INITDB_DATABASE=storybooks
ports:
- "27017:27017"
networks:
- storybooks-app
volumes:
- mongo-data:/data/db

networks:
storybooks-app:
driver: bridge

volumes:
mongo-data:
driver: local
Loading

0 comments on commit c91d78d

Please sign in to comment.