File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,8 +13,7 @@ RUN npm ci --only=production && npm cache clean --force
1313# Copy application files
1414COPY src/ ./src/
1515
16- # Copy config.json
17- COPY config.json ./config.json
16+ # Do not bake config into the image; require mounting to /app/config.json
1817
1918# Create non-root user for security
2019RUN groupadd -g 1001 nodejs && \
Original file line number Diff line number Diff line change @@ -16,8 +16,7 @@ RUN npm ci && npm cache clean --force
1616# Copy application files
1717COPY src/ ./src/
1818
19- # Copy config.json
20- COPY config.json ./config.json
19+ # Do not bake config into the image; mount to /app/config.json during development
2120
2221# Expose port
2322EXPOSE 3000
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ services:
1111 volumes :
1212 # Mount source code for hot reload with nodemon
1313 - ./src:/app/src:ro
14- # Mount config.json
15- - ./config.json:/app/config.json:ro
14+ # Mount config to required path inside container
15+ - ./custom- config.json:/app/config.json:ro
1616 environment :
1717 - NODE_ENV=development
1818 - PORT=3000 # Local development uses port 3000
You can’t perform that action at this time.
0 commit comments