diff --git a/Dockerfile b/Dockerfile index 3cf44a2..f2399db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,3 @@ -# Build stage -FROM node:23.7.0-alpine AS builder -WORKDIR /usr/src/app -COPY package*.json ./ -RUN npm ci -COPY . . - -# Production stage FROM node:23.7.0-alpine # Install dependencies with versions @@ -24,12 +16,12 @@ RUN mkdir -p /run/mysqld && \ mysql_install_db --user=mysql --datadir=/var/lib/mysql WORKDIR /usr/src/app -COPY --from=builder /usr/src/app/dist ./dist -COPY --from=builder /usr/src/app/package*.json ./ -COPY docker-start.sh ./dist/start.sh +COPY package*.json ./ +COPY start.sh ./ +COPY . . RUN npm ci --only=production && \ - chmod +x ./dist/start.sh && \ + chmod +x ./start.sh && \ chown -R appuser:appgroup . USER appuser @@ -39,4 +31,4 @@ EXPOSE 80 6379 3306 HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ CMD mysqladmin ping -h localhost || exit 1 -CMD ["./dist/start.sh"] \ No newline at end of file +CMD ["./start.sh"] \ No newline at end of file