diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..eaf3bd6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM node:alpine +WORKDIR /usr/src/app + +RUN adduser --system --uid 1001 nextjs +RUN addgroup --system --gid 1001 nodejs + +COPY --chown=nextjs:nodejs . /usr/src/app + +ENV NEXT_TELEMETRY_DISABLED 1 +ENV NODE_ENV production + +RUN npm install +RUN npm run build + +USER nextjs +EXPOSE 3000 +ENV PORT 3000 +ENTRYPOINT ["npm", "run-script", "start"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..b470c48 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: "3.9" +services: + f1calc: + container_name: f1calc + build: + context: ./ + ports: + - 3000:3000 \ No newline at end of file