Add multi-tenant organization model populated from OIDC claims with org-scoped user discovery, CalDAV principal filtering, and cross-org isolation at the SabreDAV layer. Add bookable resource principals (rooms, equipment) with CalDAV auto-scheduling that handles conflict detection, auto-accept/decline, and org-scoped booking enforcement. Fixes #14. Replace CalendarSubscriptionToken with a unified Channel model supporting CalDAV integration tokens and iCal feed URLs, with encrypted token storage and role-based access control. Fixes #16. Migrate task queue from Celery to Dramatiq with async ICS import, progress tracking, and task status polling endpoint. Replace nginx with Caddy for both the reverse proxy and frontend static serving. Switch frontend package manager from yarn/pnpm to npm and upgrade Node to 24, Next.js to 16, TypeScript to 5.9. Harden security with fail-closed entitlements, RSVP rate limiting and token expiry, CalDAV proxy path validation blocking internal API routes, channel path scope enforcement, and ETag-based conflict prevention. Add frontend pages for resource management and integration channel CRUD, with resource booking in the event modal. Restructure CalDAV paths to /calendars/users/ and /calendars/resources/ with nested principal collections in SabreDAV.
62 lines
1.9 KiB
Docker
62 lines
1.9 KiB
Docker
# sabre/dav CalDAV Server
|
|
# Based on Debian with Apache and PHP
|
|
FROM php:8.2-apache-bookworm
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Install dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
libpq-dev \
|
|
postgresql-client \
|
|
git \
|
|
unzip \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install PHP extensions
|
|
RUN docker-php-ext-install pdo pdo_pgsql
|
|
|
|
# Install Composer
|
|
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
|
|
|
# Create application directory
|
|
WORKDIR /var/www/sabredav
|
|
|
|
# Copy composer files and install dependencies
|
|
COPY composer.json ./
|
|
RUN composer install --no-dev --optimize-autoloader --no-interaction
|
|
|
|
# Copy server configuration
|
|
COPY server.php ./
|
|
COPY sabredav.conf /etc/apache2/sites-available/sabredav.conf
|
|
COPY init-database.sh /usr/local/bin/init-database.sh
|
|
|
|
# Copy SQL schema files for database initialization
|
|
COPY sql/ ./sql/
|
|
|
|
# Copy custom principal backend
|
|
COPY src/ ./src/
|
|
|
|
# Enable Apache modules and site
|
|
RUN a2enmod rewrite headers \
|
|
&& a2dissite 000-default \
|
|
&& a2ensite sabredav \
|
|
&& chmod +x /usr/local/bin/init-database.sh
|
|
|
|
# Configure PHP error logging to stderr for Docker logs
|
|
# This ensures all error_log() calls and PHP errors are visible in docker logs
|
|
# display_errors = Off prevents errors from appearing in HTTP responses (security/UX)
|
|
# but errors are still logged to stderr (Docker logs) via log_errors = On
|
|
RUN echo "log_errors = On" >> /usr/local/etc/php/conf.d/error-logging.ini \
|
|
&& echo "error_log = /proc/self/fd/2" >> /usr/local/etc/php/conf.d/error-logging.ini \
|
|
&& echo "display_errors = Off" >> /usr/local/etc/php/conf.d/error-logging.ini \
|
|
&& echo "display_startup_errors = Off" >> /usr/local/etc/php/conf.d/error-logging.ini \
|
|
&& echo "memory_limit = 512M" >> /usr/local/etc/php/conf.d/error-logging.ini
|
|
|
|
# Set permissions
|
|
RUN chown -R www-data:www-data /var/www/sabredav \
|
|
&& chmod -R 755 /var/www/sabredav
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["apache2-foreground"]
|