2 Commits

Author SHA1 Message Date
5af681939e Docker 2024-02-04 14:24:21 +03:00
6b161f2e2c Migrate to yarn 2023-06-14 22:46:53 +03:00
9 changed files with 10821 additions and 35248 deletions

View File

@@ -1,4 +1,5 @@
NODE_ENV=production
PORT=3031
URI=mongodb://localhost?retryWrites=true&w=majority
FRONTEND=https://bingo.anatolykopyl.ru
DB_NAME=vk_bingo

View File

@@ -1,11 +1,9 @@
FROM node:16-alpine
WORKDIR /app
FROM node:20-alpine
LABEL authors="anatolykopyl"
# Copy and download dependencies
COPY package.json package-lock.json ./
RUN npm install
WORKDIR /usr/node/app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
# Copy the source files into the image
COPY . .
EXPOSE 3000
CMD npm start

View File

@@ -0,0 +1,11 @@
version: '3'
services:
flexpatrol-bingo:
image: git.radner.ru/anatolykopyl/flexpatrol-bingo:latest
container_name: flexpatrol-bingo
working_dir: /usr/node/app
ports:
- "3004:3000"
command: >
sh -c "node index.js"

View File

@@ -219,10 +219,5 @@ const client = new MongoClient(process.env.URI, { useUnifiedTopology: true });
}
});
app.listen(
3000,
'0.0.0.0',
511,
() => console.log(`Server started on port ${3000}`),
);
app.listen(process.env.PORT, () => console.log(`Server started on ${process.env.PORT}`));
})();

5192
backend/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -4,8 +4,7 @@
"description": "",
"main": "index.js",
"scripts": {
"dev": "nodemon index.js",
"start": "node index.js"
"dev": "nodemon index.js"
},
"author": "Anatoly Kopyl",
"license": "ISC",

1800
backend/yarn.lock Normal file

File diff suppressed because it is too large Load Diff

30040
frontend/package-lock.json generated

File diff suppressed because it is too large Load Diff

9001
frontend/yarn.lock Normal file

File diff suppressed because it is too large Load Diff