File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ node_modules
2+ npm-debug.log
3+ Dockerfile
4+ .dockerignore
5+ .git
6+ .gitignore
7+ docker-compose.yml
Original file line number Diff line number Diff line change 1+ FROM node:24-alpine
2+
3+ # Create app user and group
4+ RUN addgroup app && adduser -S -G app app
5+
6+ WORKDIR /usr/src/app
7+
8+ # Copy package files and install dependencies as root
9+ COPY package*.json ./
10+ RUN npm ci --omit=dev
11+
12+ # Copy rest of the app
13+ COPY . .
14+
15+ # Switch to non-root user for runtime
16+ USER app
17+
18+ EXPOSE 3000
19+ CMD ["node" , "app.js" ]
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ var express = require('express');
99
1010var app = express ( ) ;
1111
12- app . set ( 'port' , process . env . PORT || 3005 ) ; // GİRİŞ PORTU AYARLANDI
12+ app . set ( 'port' , process . env . PORT || 3000 ) ; // GİRİŞ PORTU AYARLANDI
1313app . set ( 'views' , __dirname + '/app/server/views' ) ; // VIEW KLASÖRÜ TANITILDI
1414app . set ( 'view engine' , 'ejs' ) ; // VIEW ENGINE AYARLANDI
1515app . use ( express . static ( __dirname + '/app/public' ) ) ; // KULLANICILAR TARAFINDAN ERİŞİLEBİLEN KLASÖR TANIMLANDI
Original file line number Diff line number Diff line change 1- version : ' 3.7'
2-
31services :
4- environment :
5- container_name : environment
2+ app :
3+ container_name : app
64 build :
75 context : .
8- dockerfile : dockerfile
6+ dockerfile : Dockerfile
97 ports :
10- - 3005:3005
11- stdin_open : true
12- environment :
13- - CHOKIDAR_USEPOLLING=true
14- command : node app.js
8+ - " 3000:3000"
Load diff This file was deleted.
Original file line number Diff line number Diff line change 44 "description" : " Sample Node.js Project" ,
55 "main" : " app.js" ,
66 "scripts" : {
7- "start" : " node app.js" ,
8- "test" : " echo \" Error: no test specified\" && exit 1" ,
9- "build" : " echo 'Building the project...' && exit 0" // Replace this with your actual build command
7+ "start" : " node app.js"
108 },
119 "author" : " Adem Cemil YALCIN" ,
1210 "license" : " ISC" ,
You can’t perform that action at this time.
0 commit comments