Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
add .dockerignore & change compose
Browse files Browse the repository at this point in the history
  • Loading branch information
bigansh committed Jun 15, 2021
1 parent 694de09 commit 41ee19c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Folders
.git
/node_modules

#Files
.env
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM node:alpine
COPY . /app
WORKDIR /app
COPY package.json /app
RUN npm install
COPY . /app
CMD npm start
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ app.get('robots.txt', (req, res) => {
res.sendFile('robots.txt', { root: __dirname })
})

app.listen(process.env.PORT, () => {
app.listen(process.env.PORT || 3000, () => {
console.log('Connected')
})
28 changes: 22 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
version: 1.0
services:
web:
build: .
ports:
- "9000":"3000"
version: '3.0'
services:
app:
container_name: tvmultiverse28
build: .
ports:
- '9000:3000'
env_file: .env
links:
- mongo
networks:
- app-network
mongo:
container_name: mongo
image: mongo
ports:
- '27017:27017'
networks:
app-network:
driver: bridge
volumes:
dbdata:

0 comments on commit 41ee19c

Please sign in to comment.