Skip to content

Commit 26c5be7

Browse files
authored
Merge pull request #1 from codewithvk/test_deplyoment
Make App Dockerized!
2 parents 2ef9467 + 3e02943 commit 26c5be7

File tree

4 files changed

+28
-1
lines changed

4 files changed

+28
-1
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**/node_modules
2+
.gitignore
3+
.git

Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM ubuntu
2+
FROM node:17
3+
4+
WORKDIR /usr/src/app
5+
6+
ENV DEBIAN_FRONTEND noninteractive
7+
RUN apt-get update && \
8+
apt-get -y install gcc mono-mcs && \
9+
rm -rf /var/lib/apt/lists/*
10+
11+
COPY package*.json ./
12+
13+
RUN npm install
14+
15+
16+
COPY . .
17+
18+
EXPOSE 8080
19+
CMD ["npm","run","start"]

heroku.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
build:
2+
docker:
3+
web: Dockerfile
4+
run:
5+
web: npm run start

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
8-
"dev" : "nodemon server.js"
8+
"start" : "nodemon server.js"
99
},
1010
"keywords": [],
1111
"author": "",

0 commit comments

Comments
 (0)