chore: Move and update the Dockerfile for the database configuration

This commit is contained in:
2024-08-20 23:10:46 +09:00
parent 2a1bbb4a8b
commit 2727a08b0f
4 changed files with 10 additions and 3 deletions
+26
View File
@@ -0,0 +1,26 @@
# For Build
FROM node:22-slim as builder
WORKDIR /app
COPY package.json ./
COPY package-lock.json ./
COPY tsconfig.json ./
RUN npm ci
COPY . .
RUN npm run build
# For Run
FROM node:22-slim
WORKDIR /app
COPY --from=builder /app/build ./build
COPY --from=builder /app/package.json .
COPY --from=builder /app/node_modules ./node_modules
EXPOSE 3000
CMD ["node", "./build"]
View File
+3
View File
@@ -0,0 +1,3 @@
FROM postgres:16
COPY ./docker/initdb.d/ /docker-entrypoint-initdb.d/