tntprojects commited on
Commit
dce6531
·
verified ·
1 Parent(s): 6434bf0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -24
Dockerfile CHANGED
@@ -1,26 +1,18 @@
1
- # 1. Usamos la imagen oficial
2
- FROM wordpress:latest
3
 
4
- # 2. Copiamos TODOS los archivos de tu repositorio de Hugging Face (incluyendo wp-config.php)
5
- # a la carpeta donde vive la web. ¡Esto es lo que faltaba!
6
- COPY . /var/www/html/
 
 
 
 
 
 
 
 
 
 
 
7
 
8
- # 3. Ajustamos el puerto para Hugging Face
9
- RUN sed -i 's/Listen 80/Listen 7860/' /etc/apache2/ports.conf
10
- RUN sed -i 's/:80/:7860/' /etc/apache2/sites-available/000-default.conf
11
-
12
- # 4. Instalamos soporte para SQLite
13
- RUN apt-get update && apt-get install -y sqlite3 libsqlite3-dev unzip \
14
- && docker-php-ext-install pdo pdo_sqlite
15
-
16
- # 5. Instalamos y activamos el plugin de SQLite
17
- ADD https://downloads.wordpress.org/plugin/sqlite-integration.1.8.1.zip /tmp/sqlite-integration.zip
18
- RUN unzip /tmp/sqlite-integration.zip -d /var/www/html/wp-content/plugins/
19
- RUN cp /var/www/html/wp-content/plugins/sqlite-integration/db.php /var/www/html/wp-content/db.php
20
-
21
- # 6. Permisos correctos para que la base de datos se pueda crear
22
- RUN chown -R www-data:www-data /var/www/html/
23
- RUN chmod -R 775 /var/www/html/wp-content
24
-
25
- EXPOSE 7860
26
- CMD ["apache2-foreground"]
 
1
+ # ... (todo lo anterior del Dockerfile igual hasta el paso 4)
 
2
 
3
+ # 4. CREAR EL WP-CONFIG CON MODO DEBUG ACTIVADO
4
+ RUN echo "<?php \
5
+ define('DB_NAME', 'local_db'); \
6
+ define('DB_USER', 'root'); \
7
+ define('DB_PASSWORD', 'root'); \
8
+ define('DB_HOST', 'localhost'); \
9
+ define('DB_CHARSET', 'utf8'); \
10
+ define('DB_COLLATE', ''); \
11
+ \$table_prefix = 'wp_'; \
12
+ define('WP_DEBUG', true); \
13
+ define('WP_DEBUG_DISPLAY', true); \
14
+ define('WP_DEBUG_LOG', true); \
15
+ if ( ! defined( 'ABSOLUTE_PATH' ) ) { define( 'ABSOLUTE_PATH', __DIR__ . '/' ); } \
16
+ require_once ABSOLUTE_PATH . 'wp-settings.php';" > /var/www/html/wp-config.php
17
 
18
+ # ... (resto igual)