Spaces:
Build error
Build error
| # Usa una imagen base de PHP con soporte para FPM | |
| FROM php:8.2-fpm | |
| # Instala las dependencias necesarias | |
| RUN apt-get update && apt-get install -y \ | |
| nginx \ | |
| mariadb-server \ | |
| imagemagick \ | |
| graphicsmagick \ | |
| gifsicle \ | |
| git \ | |
| unzip \ | |
| certbot \ | |
| python3-certbot-nginx \ | |
| && docker-php-ext-install bcmath gd pdo pdo_mysql mbstring | |
| # Instala Composer | |
| COPY --from=composer:latest /usr/bin/composer /usr/bin/composer | |
| # Clona el repositorio de Vichan | |
| RUN git clone https://github.com/vichan-devel/vichan.git /var/www/chan.example.org | |
| # Instala las dependencias de PHP con Composer | |
| WORKDIR /var/www/chan.example.org | |
| RUN composer install | |
| # Cambia los permisos para el usuario www-data | |
| RUN chown -R www-data:www-data /var/www/chan.example.org | |
| # Copia el archivo de configuración de NGINX | |
| COPY nginx.conf /etc/nginx/sites-available/default | |
| # Exponer el puerto 80 | |
| EXPOSE 7860 | |
| # Comando para iniciar todos los servicios necesarios | |
| CMD service mysql start && \ | |
| service php8.2-fpm start && \ | |
| service nginx start && \ | |
| tail -f /dev/null |