feat: add docker scripts (ENTRYPOINT) + ziplinectl

This commit is contained in:
diced
2026-02-05 16:32:31 -08:00
parent 1f672cda3a
commit acbbb7d40a
4 changed files with 20 additions and 4 deletions

View File

@@ -33,8 +33,6 @@ COPY code.json ./code.json
COPY vite-env.d.ts ./vite-env.d.ts
COPY scripts ./scripts
ENV NEXT_TELEMETRY_DISABLED=1
RUN ZIPLINE_BUILD=true pnpm run build
FROM base
@@ -52,8 +50,15 @@ RUN pnpm prisma generate
RUN rm -rf /tmp/* /root/*
ENV NODE_ENV=production
ENV ZIPLINE_ROOT=/zipline
ARG ZIPLINE_GIT_SHA
ENV ZIPLINE_GIT_SHA=${ZIPLINE_GIT_SHA:-"unknown"}
CMD ["node", "--enable-source-maps", "build/server"]
# add scripts
COPY docker/entrypoint.sh /zipline/entrypoint
COPY docker/ziplinectl.sh /zipline/ziplinectl
RUN ln -s /zipline/ziplinectl /usr/local/bin/ziplinectl
ENTRYPOINT ["/zipline/entrypoint"]

View File

@@ -4,7 +4,7 @@
| Version | Supported |
| ------- | ------------------ |
| 4.2.x | :white_check_mark: |
| 4.4.x | :white_check_mark: |
| < 3 | :x: |
| < 2 | :x: |

5
docker/entrypoint.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env sh
set -e
cd ${ZIPLINE_ROOT:-/zipline}
exec node --enable-source-maps build/server

6
docker/ziplinectl.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/usr/bin/env sh
set -e
cd ${ZIPLINE_ROOT:-/zipline}
exec node --enable-source-maps build/ctl "$@"