tntprojects commited on
Commit
6434bf0
verified
1 Parent(s): 6a93c36

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -11
Dockerfile CHANGED
@@ -1,28 +1,26 @@
1
- # Usamos la imagen oficial de WordPress
2
  FROM wordpress:latest
3
 
4
- # Cambiamos el puerto al 7860 que exige Hugging Face
 
 
 
 
5
  RUN sed -i 's/Listen 80/Listen 7860/' /etc/apache2/ports.conf
6
  RUN sed -i 's/:80/:7860/' /etc/apache2/sites-available/000-default.conf
7
 
8
- # Instalamos las librer铆as necesarias para SQLite
9
  RUN apt-get update && apt-get install -y sqlite3 libsqlite3-dev unzip \
10
  && docker-php-ext-install pdo pdo_sqlite
11
 
12
- # Descargamos el plugin de integraci贸n de SQLite
13
  ADD https://downloads.wordpress.org/plugin/sqlite-integration.1.8.1.zip /tmp/sqlite-integration.zip
14
-
15
- # Descomprimimos el plugin en la carpeta de plugins
16
  RUN unzip /tmp/sqlite-integration.zip -d /var/www/html/wp-content/plugins/
17
-
18
- # PASO CLAVE: Copiamos el archivo db.php a wp-content para que WordPress lo use como motor
19
  RUN cp /var/www/html/wp-content/plugins/sqlite-integration/db.php /var/www/html/wp-content/db.php
20
 
21
- # Damos permisos totales a wp-content porque ah铆 se crear谩 el archivo de la base de datos (.ht.sqlite)
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
-
27
- # Iniciamos Apache
28
  CMD ["apache2-foreground"]
 
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"]