fix: backend Dockerfile copies all files, server.js uses port 3000 for container consistency
All checks were successful
DevSecOps-Multibranch/pipeline/head This commit looks good
All checks were successful
DevSecOps-Multibranch/pipeline/head This commit looks good
This commit is contained in:
@@ -14,8 +14,8 @@ COPY package*.json ./
|
||||
# Install dependencies
|
||||
RUN npm ci --only=production && npm cache clean --force
|
||||
|
||||
# Copy application files
|
||||
COPY server.js ./
|
||||
# Copy all application files
|
||||
COPY . ./
|
||||
|
||||
# Create logs directory and set permissions
|
||||
RUN mkdir -p logs && chown -R nodeapp:nodejs /app
|
||||
|
||||
@@ -19,7 +19,7 @@ const MONGODB_CONNECTION = 'mongodb://admin:supersecret123@localhost:27017/devdb
|
||||
const TWITTER_API_KEY = 'twitter_api_key_1234567890abcdef1234567890abcdef1234567890';
|
||||
|
||||
const app = express();
|
||||
const PORT = process.env.PORT || 3001;
|
||||
const PORT = process.env.PORT || 3000;
|
||||
|
||||
// Middleware
|
||||
app.use(cors());
|
||||
|
||||
Reference in New Issue
Block a user