mirror of
https://github.com/mivodev/mivo.git
synced 2026-01-26 05:25:42 +07:00
37 lines
793 B
Docker
37 lines
793 B
Docker
FROM php:8.2-fpm-alpine
|
|
|
|
# Install system dependencies
|
|
RUN apk add --no-cache \
|
|
nginx \
|
|
supervisor \
|
|
sqlite-dev \
|
|
libzip-dev \
|
|
zip \
|
|
unzip
|
|
|
|
# Install PHP extensions
|
|
RUN docker-php-ext-install pdo_sqlite zip
|
|
|
|
# Configure Nginx
|
|
COPY docker/nginx.conf /etc/nginx/http.d/default.conf
|
|
|
|
# Configure Supervisor
|
|
COPY docker/supervisord.conf /etc/supervisord.conf
|
|
|
|
# Set working directory
|
|
WORKDIR /var/www/html
|
|
|
|
# Copy application files
|
|
COPY . /var/www/html
|
|
|
|
# Create Database directory explicitly & Set Permissions
|
|
RUN mkdir -p /var/www/html/app/Database && \
|
|
chown -R www-data:www-data /var/www/html && \
|
|
chmod -R 755 /var/www/html
|
|
|
|
# Expose port
|
|
EXPOSE 80
|
|
|
|
# Start Supervisor (which starts Nginx & PHP-FPM)
|
|
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
|