Udpated Dockerfile, changed Crontab for testing purposes
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user