# Forte 26.9.10 (the ActivityPub-only fork of Streams) from its tag: the project publishes no image. Its PHP dependencies
# come from composer; Hubzilla's image (PHP 8.3 with every extension Forte asks for, php-fpm and nginx on 8080) carries
# it, Forte's code in place of Hubzilla's and an nginx that routes through `index.php?req=`, as Forte's own sample does
FROM docker.io/library/composer:2 AS builder
RUN git clone --depth 1 --branch v26.9.10 https://codeberg.org/fortified/forte /build \
	&& cd /build && composer install --no-dev --no-interaction --no-progress --ignore-platform-reqs --optimize-autoloader

FROM docker.io/hlhd/hubzilla:v11.4.1
USER root
RUN rm -rf /var/www/html && mkdir -p /var/www/html
COPY --from=builder --chown=www-data:www-data /build /var/www/html
COPY nginx.conf /etc/nginx/nginx.conf
RUN mkdir -p "/var/www/html/store/[data]/smarty3" /var/www/html/cache/smarty3 && chown -R www-data:www-data /var/www/html/store /var/www/html/cache
USER www-data
