feat: use ENTRYPOINT in docker (#286)
* :3 * Update Dockerfile Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com> * Update Dockerfile Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com> * Update Dockerfile Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com> * test --------- Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
This commit is contained in:
parent
a8d9d98cf2
commit
93a63d3714
2 changed files with 10 additions and 3 deletions
|
@ -46,7 +46,7 @@ RUN yarn build
|
||||||
# Use Alpine Linux as the final image
|
# Use Alpine Linux as the final image
|
||||||
FROM base
|
FROM base
|
||||||
|
|
||||||
RUN apk add --no-cache perl procps
|
RUN apk add --no-cache perl procps tini
|
||||||
|
|
||||||
COPY --from=builder /prisma-engines /prisma-engines
|
COPY --from=builder /prisma-engines /prisma-engines
|
||||||
ENV PRISMA_QUERY_ENGINE_BINARY=/prisma-engines/query-engine \
|
ENV PRISMA_QUERY_ENGINE_BINARY=/prisma-engines/query-engine \
|
||||||
|
@ -66,5 +66,7 @@ COPY --from=builder /zipline/node_modules ./node_modules
|
||||||
COPY --from=builder /zipline/node_modules/.prisma/client ./node_modules/.prisma/client
|
COPY --from=builder /zipline/node_modules/.prisma/client ./node_modules/.prisma/client
|
||||||
COPY --from=builder /zipline/node_modules/@prisma/client ./node_modules/@prisma/client
|
COPY --from=builder /zipline/node_modules/@prisma/client ./node_modules/@prisma/client
|
||||||
|
|
||||||
# Run the application
|
# Copy Startup Script
|
||||||
CMD ["node", "--enable-source-maps", "dist/index.js"]
|
COPY docker-entrypoint.sh /zipline
|
||||||
|
|
||||||
|
ENTRYPOINT ["tini", "--", "/zipline/docker-entrypoint.sh"]
|
5
docker-entrypoint.sh
Normal file
5
docker-entrypoint.sh
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
node --enable-source-maps dist/index.js
|
Loading…
Reference in a new issue