changes for prod container
This commit is contained in:
1 parent
4097b05cf9
commit
2cbfb03eb6
14 files changed
+128
-53
No files matched your search
+4
-18
@@ -1,21 +1,7 @@
|
||||
FROM node:20 as builder
|
||||
WORKDIR /app
|
||||
|
||||
COPY . ./
|
||||
RUN npm i
|
||||
RUN npm run build
|
||||
|
||||
# execution
|
||||
FROM node:20
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/build /app
|
||||
|
||||
# packages are not bundled in the build because sharp uses native modules
|
||||
COPY package.json /app/package.json
|
||||
RUN npm i --include prod
|
||||
|
||||
# prisma setup
|
||||
COPY ./prisma /app/prisma
|
||||
WORKDIR /usr/src/memestream
|
||||
COPY . /usr/src/memestream
|
||||
RUN npm i
|
||||
RUN npx prisma generate
|
||||
|
||||
CMD node index.js
|
||||
CMD npm start
|
||||
Reference in new issue
Block a user