Skip to content

Commit

Permalink
Docker Support
Browse files Browse the repository at this point in the history
Add --host 0.0.0.0 for client app in package.json to make dockerization working.

Modify docker-compose.yml file.
  • Loading branch information
danmgs committed Feb 3, 2019
1 parent c2c9239 commit 681d5c0
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 20,786 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ npm-debug.log
testem.log
/typings
yarn-error.log
*.lock.json

# e2e
/e2e/*.js
Expand Down
47 changes: 25 additions & 22 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
version: '3'
services:
# mongo:
# container_name: mongo
# image: mongo
# restart: always
# ports:
# - "27017:27017"
mongo:
container_name: mongo
image: mongo
restart: always
ports:
- "27017:27017"
# environment:
# ME_CONFIG_MONGODB_ADMINUSERNAME: root
# ME_CONFIG_MONGODB_ADMINPASSWORD: example
# server:
# container_name: server
# build:
# dockerfile : Dockerfile.dev
# context: ./server
# ports:
# - "3000:3000"
# environment:
# - SERVER_PORT=30001
# - MONGODB_URL=localhost
# - MONGODB_PORT=27017

server:
container_name: server
build:
dockerfile : Dockerfile.dev
context: ./server
ports:
- "30002:30001"
environment:
- SERVER_API_PORT=30002
# - MONGODB_URI=mongodb://127.0.0.1:27017
- MONGODB_URI=mongodb://mongo:27017
# volumes:
# - /app/node_modules #do not touch this dir in container
# - ./server:/app # map server to app in container
# restart: always
# links:
# - mongo
restart: always
depends_on:
- mongo
client:
container_name: client
build:
Expand All @@ -40,5 +39,9 @@ services:
# volumes:
# - /app/node_modules #do not touch this dir in container
# - ./public:/app # map public to app in container
# restart: always
restart: always
links:
- server
depends_on:
- server

1 change: 1 addition & 0 deletions public/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ npm-debug.log
testem.log
/typings
yarn-error.log
*.lock.json

# e2e
/e2e/*.js
Expand Down
Loading

0 comments on commit 681d5c0

Please sign in to comment.