-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from Danpiel/docker
Switch application base to alpine Remove expose of database port Restart policies for both
- Loading branch information
Showing
2 changed files
with
14 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |