Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +9 -11
Dockerfile
CHANGED
|
@@ -1,28 +1,26 @@
|
|
| 1 |
-
# Usamos la imagen oficial
|
| 2 |
FROM wordpress:latest
|
| 3 |
|
| 4 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
| 9 |
RUN apt-get update && apt-get install -y sqlite3 libsqlite3-dev unzip \
|
| 10 |
&& docker-php-ext-install pdo pdo_sqlite
|
| 11 |
|
| 12 |
-
#
|
| 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 |
-
#
|
| 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"]
|