Add comprehensive environment-based configuration system: - Created config.js module to centralize all environment variables - Updated server.js to use config module for all settings - Added /api/config endpoint to expose company info to frontend - Created init.js to dynamically inject config into HTML pages - Updated .env.example with comprehensive configuration options - Added data attributes to index.html for dynamic content - Updated Dockerfile to include config.js This allows users to customize: - Company name, tagline, and description - Branding colors (primary, accent, dark) - Contact information (email, phone, address, hours) - Social media links - About page content - Services offered 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
31 lines
529 B
Docker
31 lines
529 B
Docker
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"]
|