Add Dockerfile

This commit is contained in:
Takeshi Kimata
2024-06-16 14:30:08 +09:00
parent a0b20d4981
commit a8cd231a82
9 changed files with 605 additions and 26 deletions

16
backend/Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
FROM node:20-alpine
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
ENV FRONTEND_ORIGIN=http://localhost:8000
ENV PORT=8001
EXPOSE $PORT
RUN npx sequelize db:migrate
RUN echo "Migration complete."
CMD ["node", "index.js"]