Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +19 -4
Dockerfile
CHANGED
|
@@ -1,13 +1,28 @@
|
|
| 1 |
-
# Usamos
|
| 2 |
FROM wordpress:latest
|
| 3 |
|
| 4 |
-
# Cambiamos el puerto al 7860
|
| 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 |
-
#
|
| 9 |
-
RUN
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
EXPOSE 7860
|
| 12 |
|
|
|
|
| 13 |
CMD ["apache2-foreground"]
|
|
|
|
| 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"]
|