15 lines
301 B
Docker
15 lines
301 B
Docker
FROM node:22-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
USER root
|
|
|
|
# Expose port 5000
|
|
EXPOSE 5000
|
|
|
|
# Add wait-for script
|
|
COPY wait-for-mongodb.sh /wait-for-mongodb.sh
|
|
RUN chmod +x /wait-for-mongodb.sh
|
|
|
|
# Install dependencies and start the application
|
|
CMD ["sh", "-c", "/wait-for-mongodb.sh && npm install && npm run dev"]
|