mirror of
https://github.com/SunRed/haste-server.git
synced 2024-12-26 14:10:11 +01:00
Add multiarch Dockerfile
This commit is contained in:
parent
c6b6d02360
commit
8c14d12abb
1 changed files with 30 additions and 0 deletions
30
Dockerfile.multiarch
Normal file
30
Dockerfile.multiarch
Normal file
|
@ -0,0 +1,30 @@
|
|||
FROM --platform=$BUILDPLATFORM node:lts-alpine AS build
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
COPY . .
|
||||
|
||||
# Replace prod with prod-min to exclude the optional dbms dependencies
|
||||
# and uncomment the needed one below to build a smaller Docker image.
|
||||
RUN npm run prod
|
||||
#RUN npm install --no-package-lock pg
|
||||
#RUN npm install --no-package-lock aws-sdk
|
||||
#RUN npm install --no-package-lock memcached
|
||||
#RUN npm install --no-package-lock mongodb
|
||||
#RUN npm install --no-package-lock ioredis
|
||||
#RUN npm install --no-package-lock rethinkdbdash
|
||||
|
||||
FROM --platform=$TARGETPLATFORM node:lts-alpine
|
||||
RUN apk add --no-cache curl
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=build /usr/src/app .
|
||||
|
||||
ENV PORT=7777
|
||||
EXPOSE ${PORT}
|
||||
STOPSIGNAL SIGINT
|
||||
ENTRYPOINT [ "node", "server.js" ]
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s \
|
||||
--retries=1 CMD curl -sS -o /dev/null localhost:${PORT} || exit 1
|
||||
|
||||
CMD [ "npm", "start" ]
|
Loading…
Reference in a new issue