Crond now runs in container (#29)
parent
6beca85154
commit
e62cd0bb93
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
# Entrypoint for devop container
|
# Entrypoint for devop container
|
||||||
!docker/entrypoint_dev.sh
|
!docker/entrypoint_dev.sh
|
||||||
|
!docker/entrypoint.sh
|
||||||
|
|
||||||
# Config file
|
# Config file
|
||||||
!Rocket.toml
|
!Rocket.toml
|
||||||
|
|
|
@ -26,7 +26,6 @@ FROM alpine:latest
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
curl \
|
curl \
|
||||||
cron \
|
|
||||||
libgcc \
|
libgcc \
|
||||||
libpq \
|
libpq \
|
||||||
openssl && \
|
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
|
# The workdir is changed so that the config file is read properly
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --chown=fej:fej Rocket.toml /app/Rocket.toml
|
COPY --chown=fej:fej Rocket.toml /app/Rocket.toml
|
||||||
|
COPY ./docker/entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
HEALTHCHECK \
|
HEALTHCHECK \
|
||||||
--interval=10s \
|
--interval=10s \
|
||||||
|
@ -51,4 +51,4 @@ HEALTHCHECK \
|
||||||
--retries=3 \
|
--retries=3 \
|
||||||
CMD curl -q localhost:8000
|
CMD curl -q localhost:8000
|
||||||
|
|
||||||
ENTRYPOINT ["/app/bin/server"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
crond -b
|
||||||
|
|
||||||
|
exec "/app/bin/server"
|
3
fejctl
3
fejctl
|
@ -11,7 +11,6 @@ function dc() {
|
||||||
local OPTIND c build_builder release
|
local OPTIND c build_builder release
|
||||||
|
|
||||||
while getopts ":br" c; do
|
while getopts ":br" c; do
|
||||||
echo "$c"
|
|
||||||
case $c in
|
case $c in
|
||||||
b ) build_builder=1 ;;
|
b ) build_builder=1 ;;
|
||||||
r ) release=1 ;;
|
r ) release=1 ;;
|
||||||
|
@ -99,7 +98,7 @@ function main() {
|
||||||
|
|
||||||
# Running
|
# Running
|
||||||
r | run ) dcr run --bin "$bin" && dc -- logs -f app ;;
|
r | run ) dcr run --bin "$bin" && dc -- logs -f app ;;
|
||||||
rr | run-release ) dc -br -- run --build --detach ;;
|
rr | run-release ) dc -br -- up --build --detach && dc -r -- logs -f app ;;
|
||||||
s | stop ) dc down ;;
|
s | stop ) dc down ;;
|
||||||
sr | stop-release ) dc -r stop ;;
|
sr | stop-release ) dc -r stop ;;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue