fix started for container

dev
Vladimir Kutkovoy 11 months ago
parent a37a68e8a4
commit 28ca523d9c
  1. 2
      .drone.yml
  2. 5
      Docker-api
  3. 3
      main.js
  4. 17
      package.json

@ -9,7 +9,7 @@ steps:
dockerfile: ./Docker-api
tags:
- latest
repo: 192.168.0.129:5000/trash-api1
repo: 192.168.0.129:5000/trash-api
registry: 192.168.0.129:5000
insecure: true

@ -8,4 +8,7 @@ COPY package*.json ./
RUN npm ci
COPY . .
EXPOSE 3001/tcp
RUN npm run build
EXPOSE 3001/tcp
CMD npm start

@ -2,7 +2,7 @@ const express = require('express')
const util = require('util');
const bodyParser = require('body-parser');
const app = express()
const PORT = 3333;
const PORT = 3001;
app.use(bodyParser.urlencoded({ extended: true }));
app.use(express.json())
@ -26,7 +26,6 @@ app.get('/', (req, res) => {
res.send('OK')
})
app.listen(PORT, () => {
console.log(`Start on http://localhost:${PORT}`);
})

@ -3,5 +3,20 @@
"body-parser": "^1.20.3",
"express": "^4.21.2",
"util": "^0.12.5"
}
},
"name": "trash-api",
"description": "Датчик наполнения мусорных контейнеров. Система позволяет пользователю получить информацию о наполненности мусорных контейнеров. Тем самым помогает ему решить задачи оптимизации и эффективности предоставления услуг по управлению отходами.",
"version": "1.0.0",
"main": "main.js",
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node main.js"
},
"repository": {
"type": "git",
"url": "https://git.vladimirkutkovoy.ru/vladimirkutkovoy/TrashAdmin.git"
},
"author": "",
"license": "ISC"
}

Loading…
Cancel
Save