Crond now runs in container (#29)
This commit is contained in:
parent
6beca85154
commit
e62cd0bb93
4 changed files with 9 additions and 4 deletions
|
|
@ -26,7 +26,6 @@ FROM alpine:latest
|
|||
RUN apk update && \
|
||||
apk add --no-cache \
|
||||
curl \
|
||||
cron \
|
||||
libgcc \
|
||||
libpq \
|
||||
openssl && \
|
||||
|
|
@ -43,6 +42,7 @@ COPY --from=builder --chown=fej:fej /app/output/bin /app/bin
|
|||
# The workdir is changed so that the config file is read properly
|
||||
WORKDIR /app
|
||||
COPY --chown=fej:fej Rocket.toml /app/Rocket.toml
|
||||
COPY ./docker/entrypoint.sh /entrypoint.sh
|
||||
|
||||
HEALTHCHECK \
|
||||
--interval=10s \
|
||||
|
|
@ -51,4 +51,4 @@ HEALTHCHECK \
|
|||
--retries=3 \
|
||||
CMD curl -q localhost:8000
|
||||
|
||||
ENTRYPOINT ["/app/bin/server"]
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
|
|
|||
5
docker/entrypoint.sh
Executable file
5
docker/entrypoint.sh
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
crond -b
|
||||
|
||||
exec "/app/bin/server"
|
||||
Reference in a new issue