chore: copy code files into images for Coolify & ignore local mounts
This commit is contained in:
@@ -5,12 +5,20 @@ RUN apk add --no-cache libc6-compat
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy dependency files first
|
||||
COPY sistem-km-next/package*.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install
|
||||
|
||||
# Copy the rest of the application files
|
||||
COPY sistem-km-next/ .
|
||||
|
||||
# Expose Next.js port
|
||||
EXPOSE 3000
|
||||
|
||||
ENV PORT 3000
|
||||
ENV HOSTNAME "0.0.0.0"
|
||||
|
||||
# Automatically install dependencies (to handle architecture differences between Windows host and Linux container)
|
||||
# and run Next.js in development mode
|
||||
CMD ["sh", "-c", "npm install && npm run dev"]
|
||||
# Start Next.js app in development mode
|
||||
CMD ["npm", "run", "dev"]
|
||||
|
||||
@@ -12,5 +12,8 @@ RUN echo "LimitRequestFieldSize 65536" >> /etc/apache2/apache2.conf
|
||||
# Set working directory
|
||||
WORKDIR /var/www/html
|
||||
|
||||
# Copy source files
|
||||
COPY . /var/www/html/
|
||||
|
||||
# Expose port 80
|
||||
EXPOSE 80
|
||||
|
||||
Reference in New Issue
Block a user