Skip to content

Commit

Permalink
feat: dockerize web (pathwar#59)
Browse files Browse the repository at this point in the history
feat: dockerize web
  • Loading branch information
moul authored May 9, 2019
2 parents 3ca3e38 + 684f4d9 commit 37d4d5b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
node_modules
package-lock.json
yarn.lock
.circleci/
test/
.git/
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.env

vendor/
*~
*#
Expand Down
10 changes: 9 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,12 @@ services:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: uns3cur3
MYSQL_DATABASE: pathwar
MYSQL_DATABASE: pathwar

web:
build: web
ports:
- 3000:3000
- 3001:3001
environment:
- NODE_ENV=development
15 changes: 15 additions & 0 deletions web/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:11-stretch

WORKDIR /app

COPY package*.json ./

RUN npm install
#RUN npm ci --only=production

COPY . .

EXPOSE 3000 3001
CMD [ "npm", "start" ]

# FIXME: add build step for production

0 comments on commit 37d4d5b

Please sign in to comment.