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
|
# Install dependencies
|
||||||
RUN npm ci --only=production && npm cache clean --force
|
RUN npm ci --only=production && npm cache clean --force
|
||||||
|
|
||||||
# Copy application files
|
# Copy all application files
|
||||||
COPY server.js ./
|
COPY . ./
|
||||||
|
|
||||||
# Create logs directory and set permissions
|
# Create logs directory and set permissions
|
||||||
RUN mkdir -p logs && chown -R nodeapp:nodejs /app
|
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 TWITTER_API_KEY = 'twitter_api_key_1234567890abcdef1234567890abcdef1234567890';
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
const PORT = process.env.PORT || 3001;
|
const PORT = process.env.PORT || 3000;
|
||||||
|
|
||||||
// Middleware
|
// Middleware
|
||||||
app.use(cors());
|
app.use(cors());
|
||||||
|
|||||||
Reference in New Issue
Block a user