generated from StartanAICompany/ai-recruit-site-template
Initial commit
This commit is contained in:
30
Dockerfile
Normal file
30
Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
FROM node:18-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY package*.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install --production
|
||||
|
||||
# Copy application code
|
||||
COPY server.js ./
|
||||
COPY config.js ./
|
||||
COPY migrations ./migrations
|
||||
|
||||
# Copy public directory explicitly
|
||||
COPY public/ ./public/
|
||||
|
||||
# Create non-root user and fix permissions
|
||||
RUN addgroup -g 1001 -S nodejs && \
|
||||
adduser -S nodejs -u 1001 && \
|
||||
chown -R nodejs:nodejs /app && \
|
||||
ls -la /app && \
|
||||
ls -la /app/public
|
||||
|
||||
USER nodejs
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["node", "server.js"]
|
||||
Reference in New Issue
Block a user