Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .examples/docker/docker-compose-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ services:
cron:
image: librebooking/librebooking:4.1.0
restart: always
user: root
entrypoint: /usr/local/bin/cron.sh
command: supercronic /config/lb-jobs-cron
depends_on:
- app
volumes:
Expand Down
6 changes: 2 additions & 4 deletions .examples/docker/docker-compose-public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ services:
restart: always
depends_on:
- lb1
user: root
entrypoint: /usr/local/bin/cron.sh
command: supercronic /config/lb-jobs-cron
volumes:
- lb1_conf:/config
env_file:
Expand Down Expand Up @@ -89,8 +88,7 @@ services:
restart: always
depends_on:
- lb2
user: root
entrypoint: /usr/local/bin/cron.sh
command: supercronic /config/lb-jobs-cron
volumes:
- lb2_conf:/config
env_file:
Expand Down
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ fi
rm -rf .git
EORUN

# Build supercronic
FROM golang:trixie AS supercronic
ADD https://github.com/aptible/supercronic.git#v0.2.44 src
WORKDIR /go/src
RUN <<EORUN
set -eux
go mod vendor
go install
EORUN

FROM php:${VERSION_PHP}-apache
# Labels
LABEL org.opencontainers.image.title="LibreBooking"
Expand All @@ -40,6 +50,10 @@ COPY --chown=www-data:www-data --chmod=0755 \
# Copy composer
COPY --from=comp /usr/bin/composer /usr/bin/composer

# Copy supercronic
COPY --from=supercronic \
/go/bin/supercronic /usr/local/bin/supercronic

# Copy Librebooking
COPY --from=upstream \
--chown=www-data:root --chmod=0775 \
Expand Down
5 changes: 1 addition & 4 deletions RUN.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@ scheduler. For a full list of background jobs, checkout the
The background jobs can either be handled by the:

* Container itself, by running a separate `librebooking/librebooking` container
where the:

* user is set to `root`
* entrypoint is set to `cron.sh`
where the command is set to `supercronic /config/lb-jobs-cron`

* Host running the container, by calling the desired script, as in

Expand Down
57 changes: 0 additions & 57 deletions bin/cron.sh

This file was deleted.

12 changes: 6 additions & 6 deletions lb-jobs-cron
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
* * * * * /usr/local/bin/php -f /var/www/html/Jobs/autorelease.php > /dev/stdout 2>&1
* * * * * /usr/local/bin/php -f /var/www/html/Jobs/sendmissedcheckin.php > /dev/stdout 2>&1
* * * * * /usr/local/bin/php -f /var/www/html/Jobs/sendreminders.php > /dev/stdout 2>&1
0 0 * * * /usr/local/bin/php -f /var/www/html/Jobs/sendseriesend.php > /dev/stdout 2>&1
* * * * * /usr/local/bin/php -f /var/www/html/Jobs/sendwaitlist.php > /dev/stdout 2>&1
0 0 * * * /usr/local/bin/php -f /var/www/html/Jobs/sessioncleanup.php > /dev/stdout 2>&1
* * * * * /usr/local/bin/php -f /var/www/html/Jobs/autorelease.php
* * * * * /usr/local/bin/php -f /var/www/html/Jobs/sendmissedcheckin.php
* * * * * /usr/local/bin/php -f /var/www/html/Jobs/sendreminders.php
0 0 * * * /usr/local/bin/php -f /var/www/html/Jobs/sendseriesend.php
* * * * * /usr/local/bin/php -f /var/www/html/Jobs/sendwaitlist.php
0 0 * * * /usr/local/bin/php -f /var/www/html/Jobs/sessioncleanup.php
1 change: 0 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ set -x
apt-get update
apt-get upgrade --yes
apt-get install --yes --no-install-recommends \
cron \
libjpeg-dev \
libldap-dev \
libpng-dev \
Expand Down