diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..5a78d39 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,14 @@ +const { build } = require('esbuild'); + +build({ + entryPoints: ['index.js'], + minify: true, + platform: 'node', + bundle: true, + outfile: 'dist/build.js', +}) + .then(() => console.log('Build Complete!🎉')) + .catch(() => { + console.error('Build failed 😿'); + process.exit(1); + }); diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7276a80 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM node:20-alpine + +WORKDIR /app + +COPY package*.json ./ + +RUN npm install + +COPY . . + +EXPOSE 5000 + +RUN npm run build + +CMD ["npm" ,"run", "start"] \ No newline at end of file