This commit is contained in:
Luke Gustafson
2024-11-27 03:59:16 +00:00
parent 8e6923b7a0
commit cfb3a4acb6
2 changed files with 34 additions and 31 deletions

View File

@@ -13,15 +13,17 @@ COPY backend/package*.json ./
RUN npm install
COPY backend/ .
# Production image using nginx:alpine
FROM nginx:alpine
RUN apk add --no-cache nodejs npm
COPY docker/nginx.conf /etc/nginx/nginx.conf
COPY --from=frontend-build /app/frontend/dist /usr/share/nginx/html
COPY --from=backend-build /backend /backend
COPY --from=backend-build /backend/entrypoint.sh /backend/entrypoint.sh
# Make entrypoint.sh executable
RUN chmod +x /backend/entrypoint.sh
# Use entrypoint script to start backend and frontend servers
ENTRYPOINT ["/backend/entrypoint.sh"]
ENTRYPOINT ["/backend/entrypoint.sh"]
EXPOSE 80
EXPOSE 3001