3386ac6542
- Rewrite db.php to use SQLite via PDO (no external DB server needed) - Rewrite schema.sql for SQLite (AUTOINCREMENT, CHECK constraints, triggers for updated_at, ON CONFLICT instead of ON DUPLICATE KEY) - Fix config.php upsert to use ON CONFLICT syntax - Fix index.php: tag filter via json_each, vote upsert via ON CONFLICT, and fix protocol create route (was returning 405 for POST /api/protocols) - Fix yaml.php seed import: replace invalid false callbacks with fn() => null, fix yaml_parse pos argument (-1 -> 0) - Update Dockerfile: drop pdo_mysql/mysqli (pdo_sqlite is built in) - Update CloudronManifest.json: remove mysql addon, bump to v0.3.0 - Update README for SQLite deployment
24 lines
721 B
Docker
24 lines
721 B
Docker
FROM php:8.2-apache
|
|
|
|
# Install YAML extension (pdo_sqlite is already included in php:8.2-apache)
|
|
RUN docker-php-ext-install pdo
|
|
|
|
# Install PECL yaml extension
|
|
RUN apt-get update && apt-get install -y libyaml-dev && \
|
|
pecl install yaml && docker-php-ext-enable yaml && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Enable Apache rewrite module for .htaccess
|
|
RUN a2enmod rewrite
|
|
|
|
# Set document root to our app
|
|
ENV APACHE_DOCUMENT_ROOT /var/www/html
|
|
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/000-default.conf
|
|
|
|
# Copy app files
|
|
COPY . /var/www/html/
|
|
|
|
# Ensure data directory is writable (for SQLite database)
|
|
RUN mkdir -p /var/www/html/data && chmod 777 /var/www/html/data
|
|
|
|
EXPOSE 80 |