mirror of
https://github.com/anatolykopyl/vk-bingo.git
synced 2026-03-26 21:04:26 +00:00
Compare commits
1 Commits
d6f1e9ef71
...
docker
| Author | SHA1 | Date | |
|---|---|---|---|
| 091d6c8d46 |
@@ -1,5 +1,4 @@
|
|||||||
NODE_ENV=production
|
NODE_ENV=production
|
||||||
PORT=3031
|
|
||||||
URI=mongodb://localhost?retryWrites=true&w=majority
|
URI=mongodb://localhost?retryWrites=true&w=majority
|
||||||
FRONTEND=https://bingo.anatolykopyl.ru
|
FRONTEND=https://bingo.anatolykopyl.ru
|
||||||
DB_NAME=vk_bingo
|
DB_NAME=vk_bingo
|
||||||
|
|||||||
11
backend/Dockerfile
Normal file
11
backend/Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
FROM node:16-alpine
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy and download dependencies
|
||||||
|
COPY package.json package-lock.json ./
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# Copy the source files into the image
|
||||||
|
COPY . .
|
||||||
|
EXPOSE 3000
|
||||||
|
CMD npm start
|
||||||
@@ -219,5 +219,10 @@ const client = new MongoClient(process.env.URI, { useUnifiedTopology: true });
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
app.listen(process.env.PORT, () => console.log(`Server started on ${process.env.PORT}`));
|
app.listen(
|
||||||
|
3000,
|
||||||
|
'0.0.0.0',
|
||||||
|
511,
|
||||||
|
() => console.log(`Server started on port ${3000}`),
|
||||||
|
);
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nodemon index.js"
|
"dev": "nodemon index.js",
|
||||||
|
"start": "node index.js"
|
||||||
},
|
},
|
||||||
"author": "Anatoly Kopyl",
|
"author": "Anatoly Kopyl",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
|||||||
Reference in New Issue
Block a user