Add Docker image, entrypoint, compose example and registry build workflow

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-11 20:49:25 +01:00
1 parent 5b3fccde67
commit c75f311324
7 files changed
+157

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
# PlenarIO container: PHP's built-in server via `bin/cake server`, app in /app, SQLite in /data.
# Configuration only through environment variables (see config/.env.example).
FROM php:8.5-cli-alpine AS base
RUN apk add --no-cache icu-libs \
&& apk add --no-cache --virtual .build-deps $PHPIZE_DEPS icu-dev \
&& docker-php-ext-install -j"$(nproc)" intl \
&& apk del .build-deps
FROM base AS build
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
WORKDIR /app
COPY composer.json composer.lock ./
# --no-scripts: the installer must not bake a random salt into app_local.php (SECURITY_SALT comes at runtime)
RUN composer install --no-dev --no-scripts --no-progress --prefer-dist --optimize-autoloader
COPY . .
RUN composer dump-autoload --no-dev --optimize \
&& cp config/app_local.example.php config/app_local.php
FROM base
WORKDIR /app
COPY --from=build /app /app
COPY docker/entrypoint.sh /usr/local/bin/plenario-entrypoint
ENV DEBUG=false \
SHOW_ADMIN_LINK_AFTER_CREATE=false \
DATABASE_URL=sqlite:////data/plenario.sqlite \
PHP_CLI_SERVER_WORKERS=8
RUN chmod +x /usr/local/bin/plenario-entrypoint \
&& mkdir -p /data /app/tmp /app/logs \
&& chown -R www-data:www-data /data /app/tmp /app/logs
USER www-data
VOLUME /data
EXPOSE 8765
# static file: the Host-header check (APP_FULL_BASE_URL) would reject 127.0.0.1 on real pages
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s \
CMD wget -q -O /dev/null http://127.0.0.1:8765/css/plenario.css || exit 1
ENTRYPOINT ["plenario-entrypoint"]