Udpated Dockerfile, changed Crontab for testing purposes

This commit is contained in:
2025-10-20 23:16:35 +02:00
parent fd0081d4d0
commit 877d9e37b3
2 changed files with 6 additions and 4 deletions

View File

@@ -28,22 +28,24 @@ RUN cd /temp/prod && bun install --frozen-lockfile --production
# then copy all (non-ignored) project files into the image
FROM base AS prerelease
COPY --from=install /temp/dev/node_modules node_modules
COPY . .
COPY . ./
# [optional] tests & build
ENV NODE_ENV=production
# copy production dependencies and source code into final image
FROM base AS release
WORKDIR /opt/app
COPY --from=install /temp/prod/node_modules node_modules
COPY --from=prerelease /opt/app/src/app.ts .
COPY --from=prerelease /opt/app/package.json .
COPY --from=prerelease /opt/app/entrypoint.sh .
#COPY --from=prerelease .entrypoint.sh .
COPY Crontab /etc/cron.d/
RUN chmod 0644 /etc/cron.d/Crontab
COPY . ./
# USER bun
RUN touch /var/log/cron.log
# RUN chmod +x entrypoint.sh
# ENTRYPOINT ["./entrypoint.sh"]
VOLUME ["/opt/app/data/db"]
CMD cron && tail -f /var/log/cron.log
CMD bun run ./src/app.ts --today && cron && tail -f /var/log/cron.log