Skip to content

Commit a3db8d8

Browse files
committed
drop config copy
1 parent 1769943 commit a3db8d8

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ RUN npm ci --only=production && npm cache clean --force
1313
# Copy application files
1414
COPY 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
2019
RUN groupadd -g 1001 nodejs && \

Dockerfile.dev

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ RUN npm ci && npm cache clean --force
1616
# Copy application files
1717
COPY 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
2322
EXPOSE 3000

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)