From 20ddcba4845db4f8cfb9ece6a38bb5db427ae4b9 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Tue, 12 Dec 2023 17:04:52 +0100 Subject: Add Hubzilla sandcastle. See hubzilla.castle.yml for installation and usage instructions to get started. --- hubzilla.Dockerfile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 hubzilla.Dockerfile (limited to 'hubzilla.Dockerfile') diff --git a/hubzilla.Dockerfile b/hubzilla.Dockerfile new file mode 100644 index 0000000..9403305 --- /dev/null +++ b/hubzilla.Dockerfile @@ -0,0 +1,36 @@ +FROM php:8.1-fpm-alpine + +COPY --chmod=766 volumes/root-ca/certs/root_ca.crt /usr/local/share/ca-certificates/root_ca.crt + +RUN \ + cat /usr/local/share/ca-certificates/root_ca.crt >> /etc/ssl/certs/ca-certificates.crt && \ + cat /usr/local/share/ca-certificates/root_ca.crt >> /etc/ssl1.1/certs/ca-certificates.crt + +RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" + +# Install required dependencies and php extensions +ADD --chmod=755 \ + https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions \ + /usr/local/bin/ +RUN \ + apk add --no-cache git bash && \ + install-php-extensions gd pdo_pgsql zip + + +USER www-data +WORKDIR /var/www/html + +# Install and set up Hubzilla and default addons +# +# Also make sure we add the step CA cert to the indernal cert store used by +# Hubzilla. +RUN \ + git clone "https://framagit.org/hubzilla/core.git" . && \ + ./util/add_addon_repo "https://framagit.org/hubzilla/addons.git" hzaddons && \ + mkdir -p "store/[data]/smarty3" && \ + cat /usr/local/share/ca-certificates/root_ca.crt >> library/cacert.pem + +USER root + +# Set up periodic cron job to hancle background tasks +COPY volumes/hubzilla/crontab /etc/periodic/15min/hubzilla.sh -- cgit v1.2.3