Skip to content

Commit

Permalink
Merge pull request #53 from Danpiel/docker
Browse files Browse the repository at this point in the history
 Switch application base to alpine
Remove expose of database port
Restart policies for both
  • Loading branch information
synzen committed Jun 3, 2018
2 parents bc8381b + 6754394 commit 7285686
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM node:latest
FROM node:alpine
WORKDIR /usr/src/discord-rss
COPY package*.json ./
RUN npm install
COPY . .
CMD ["node", "server.js"]
CMD ["node", "server.js"]
23 changes: 12 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
version: "3"
volumes:
mongo:
services:
mongo:
container_name: discord-rss-mongo
# Use port 27018 instead of the default 27017 to prevent conflicts
command: mongod --port 27018
container_name: discord-rss-mongodb
restart: on-failure:5
command: mongod --port 27017
# Uncomment below to hide mongo logs
#logging:
# driver: none
image: mongo
image: mongo:latest
volumes:
- 'mongo:/data/db'
ports:
- "27018:27018"
discord-rss:
expose:
- 27017
discordrss:
container_name: discord-rss
restart: always
restart: on-failure:10
build: .
links:
- mongo
- mongo

volumes:
mongo:

0 comments on commit 7285686

Please sign in to comment.