diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..94505d8 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +.git +.gitignore +node_modules +build +npm-debug.log diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1132d8f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +# Use Node 20 slim image +FROM node:20-slim + +WORKDIR /app + +COPY package*.json /app/ + +RUN npm config set fetch-retry-maxtimeout 600000 \ + && npm config set fetch-retries 5 \ + && npm config set fetch-retry-mintimeout 10000 \ + && npm install --no-audit --no-fund + +COPY . /app/ + +EXPOSE 3000 + +# Start development server +CMD ["npm", "start"]