Update PORT variable to use process.env.PORT or 5053
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-03-27 18:23:55 +01:00
parent be57c29e6e
commit a09fc0f2cc
3 changed files with 39 additions and 1 deletions

25
.drone.yml Normal file
View File

@@ -0,0 +1,25 @@
kind: pipeline
name: build-and-deploy
steps:
- name: build
image: node:latest
environment:
USERNAME:
from_secret: git_username
PASSWORD:
from_secret: git_password
commands:
- npm install
- node -v
- name: create-docker-image-insider
image: plugins/docker
settings:
registry: git.dinawo.fr
repo: git.dinawo.fr/drone/cdn-app-insider
tags: latest
username:
from_secret: git_username
password:
from_secret: git_password

13
Dockerfile Normal file
View File

@@ -0,0 +1,13 @@
FROM node:14
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 5053
CMD [ "npm", "start" ]

View File

@@ -108,7 +108,7 @@ async function fileExists(filePath) {
} }
} }
const PORT = process.env.PORT || 3000; const PORT = process.env.PORT || 5053;
app.listen(PORT, () => { app.listen(PORT, () => {
console.clear(); console.clear();
if (logger) { if (logger) {