Standalone DAViCal image based on official PHP image
50K+
Standalone DAViCal docker image (based on official PHP image).
Images are tagged with the DAViCal version, AWL version, PHP version, and distribution.
The latest tag points to the most recent version of the image on the current stable Debian.
The nightly tag points to builds from the master branches of DAViCal and AWL on the current stable Debian.
See the most recently pushed images on Docker Hub as fintechstudios/davical
and via the GitLab CI pipelines.
The image runs DAViCal built on the official php:apache
image, so all that needs to be supplied is a PostgreSQL database. By default, this is
specified using the environment variables listed below, but this behavior can be overridden
by providing your own DAViCal config.php.
The image also contains scripts to set up the database and apply the necessary migrations for DAViCal updates. Doing so requires privileged access to postgres - which is not always desirable in production applications - so must be enabled by separate environment variables.
The following variables are used to connect to postgres, although some sane defaults are supplied to match typical DAViCal usage:
PGHOST - the database hostPGPASSWORD - the password for PGUSERPGUSER - (default: davical_app) the database userPGDATABASE - (default: davical) the database namePGPORT - (default: 5432) the database portYou may also want to supply any of the following variables to override default behavior:
HOST_NAME - (default: localhost) used as Apache ServerNameADMIN_EMAIL - (default: [email protected]) email displayed on login page and in "From" for password reset emailsTZ - (default: UTC) system timezone nameIf you want to run the database migrations, supply the following variables (as well as the previous mentioned variables):
ROOT_PGUSER - postgres user with permissions to create users and databasesROOT_PGPASSWORD - password for ROOT_PGUSERDAVICAL_ADMIN_PASS - password you would like to use for DAViCal admin userDBA_PGUSER - (default: davical_dba) the PG (super)user used by DAViCal for database operationsDBA_PGPASSWORD - (default: value of PGPASSWORD) the password for DBA_PGUSERRUN_MIGRATIONS_AT_STARTUP - (default: none) if set to "true", the migrations will be run each time the image starts.
This behavior is disabled by default.The docker-compose.yml provided in this repo shows the minimum needed configuration.
You can run it directly and access the DAViCal instance at http://localhost:4080
docker-compose up
In production, you'll typically want to disable RUN_MIGRATIONS_AT_STARTUP and only run those as-needed
(to ensure migrations are run intentionally). You can do so using docker-compose like so:
# just start postgres
docker-compose up -d postgres
# run the migrations, then exit
docker-compose run --rm -e RUN_MIGRATIONS_AT_STARTUP= davical run-migrations
# just run davical (no migrations)
docker-compose run --service-ports -e RUN_MIGRATIONS_AT_STARTUP= davical
If you would like to specify your own config.php, simply mount it to /etc/davical/config.php to overwrite the
existing file:
docker-compose run --service-ports -v ./my-config.php:/etc/davical/config.php davical
To build the image, simply run the docker-compose or docker build command:
docker-compose build davical
# or
docker build -t fintechstudios/davical .
Build args can be specified to build a different version of DAViCal. You should be able to specify tag names, branch names, or commit hashes from the DAViCal / AWL repos as the version names. For example:
docker-compose build \
--build-arg DAVICAL_VERSION="r1.1.10" \
--build-arg DAVICAL_SHA512="20a4a473b12d467131a3b93aed1828ae978cf3b34feedecda384a974814b285c1b842d1ec0d2638b14388a94643ed6f5566a5993884b6e71bdaf6789ce43bd63" \
--build-arg AWL_VERSION="r0.62" \
--build-arg AWL_SHA512="c4de99e627ba3bd0a0ace1feef89a341d1bb29c79e4f1f0dc786da890b7540577444a19f10d0ae118d53ae723bd61538e82fee15aa689d1a4b7fc13a39c4a559" \
davical
You can skip the SHA512 check by setting the sha values to be empty:
docker-compose build \
--build-arg DAVICAL_VERSION="e8b43e60dbbd7bf6860b00a820556ef484aca9e5" \
--build-arg DAVICAL_SHA512= \
--build-arg AWL_VERSION="3f044e2dc8435c2eeba61a3c41ec11c820711ab3" \
--build-arg AWL_SHA512= \
davical
That said, a utility is provided to easily get the SHA512 for a set of releases, e.g.
./helpers/get-release-sha.sh e8b43e60dbbd7bf6860b00a820556ef484aca9e5 3f044e2dc8435c2eeba61a3c41ec11c820711ab3
Content type
Image
Digest
sha256:fd9c3a1a0…
Size
197.3 MB
Last updated
about 2 months ago
docker pull fintechstudios/davical:nightly