Skip to content

Commit

Permalink
almost done
Browse files Browse the repository at this point in the history
  • Loading branch information
oneturkmen committed Aug 4, 2018
1 parent 084a2ca commit b7f3a53
Show file tree
Hide file tree
Showing 8 changed files with 727 additions and 20 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ typings/

# next.js build output
.next

# TS dist folder
dist/
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# use Node.js version 9
FROM node:9
# use Node.js version latest
FROM node

# create app folder in the container (not the host)
RUN mkdir -p /app
Expand All @@ -8,7 +8,10 @@ RUN mkdir -p /app
WORKDIR /app

# copies everything from the current directory into the /app folder inside the container (COPY <host_dir> <container_dir>)
COPY . /app
COPY package.json /app

# runs "npm install" command inside the container
RUN ["npm", "install"]
RUN ["npm", "install"]

# copy the node_modules and the rest of the files into /app
COPY . /app
187 changes: 171 additions & 16 deletions README.md

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "3" # use version Compose version 3
services: # our services
api:
image: node # use latest node image
working_dir: /app # set the working directory to /app
volumes: # volumes are there to let us persist data when containers are exited
- .:/app # bind a current directory of the host to the /app directory in the container
ports:
- 3000:3000 # bind port 3000 on host to port 3000 on container
command: "npm run build-and-start"
Loading

0 comments on commit b7f3a53

Please sign in to comment.