Fix volume mapping so Composer‑installed plugins persist and load correctly
parent
de80164488
commit
d6cac418a0
|
|
@ -1,4 +1,4 @@
|
||||||
FROM wordpress:php8.2-apache
|
FROM wordpress:php8.2-apache AS base
|
||||||
|
|
||||||
# -------------------------------------------------
|
# -------------------------------------------------
|
||||||
# 1️⃣ Remove bundled themes (keep only core)
|
# 1️⃣ Remove bundled themes (keep only core)
|
||||||
|
|
@ -56,7 +56,12 @@ RUN mkdir -p /var/www/html/wp-content/uploads && \
|
||||||
chmod -R 775 /var/www/html/wp-content
|
chmod -R 775 /var/www/html/wp-content
|
||||||
|
|
||||||
# -------------------------------------------------
|
# -------------------------------------------------
|
||||||
# 9️⃣ Install plugins via Composer **after** core is present
|
# 8️⃣ Ensure plugins directory exists before Composer
|
||||||
|
# -------------------------------------------------
|
||||||
|
RUN mkdir -p wp-content/plugins
|
||||||
|
|
||||||
|
# -------------------------------------------------
|
||||||
|
# 9️⃣ **Install plugins via Composer after core exists**
|
||||||
# -------------------------------------------------
|
# -------------------------------------------------
|
||||||
COPY composer.json composer.lock ./
|
COPY composer.json composer.lock ./
|
||||||
RUN composer install --no-dev --optimize-autoloader && \
|
RUN composer install --no-dev --optimize-autoloader && \
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "indymedia/indymedia-wordpress",
|
|
||||||
"version": "0.1.0",
|
|
||||||
"require": {
|
"require": {
|
||||||
|
"composer/installers": "^2.2",
|
||||||
"wpackagist-plugin/activitypub": "^2.0",
|
"wpackagist-plugin/activitypub": "^2.0",
|
||||||
"wpackagist-plugin/antispam-bee": "^2.11",
|
"wpackagist-plugin/antispam-bee": "^2.11",
|
||||||
"wpackagist-plugin/archiveo-importer-wayback": "*",
|
"wpackagist-plugin/archiveo-importer-wayback": "*",
|
||||||
|
|
@ -20,21 +19,6 @@
|
||||||
"wpackagist-plugin/webmention": "^5.0",
|
"wpackagist-plugin/webmention": "^5.0",
|
||||||
"wpackagist-plugin/wp-super-cache": "^2.0"
|
"wpackagist-plugin/wp-super-cache": "^2.0"
|
||||||
},
|
},
|
||||||
"repositories": [
|
|
||||||
{
|
|
||||||
"type": "composer",
|
|
||||||
"url": "https://wpackagist.org"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"extra": {
|
|
||||||
"installer-paths": {
|
|
||||||
"wp-content/plugins/{$name}/": [
|
|
||||||
"type:wordpress-plugin"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"minimum-stability": "dev",
|
|
||||||
"prefer-stable": true,
|
|
||||||
"config": {
|
"config": {
|
||||||
"allow-plugins": {
|
"allow-plugins": {
|
||||||
"composer/installers": true
|
"composer/installers": true
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ services:
|
||||||
WORDPRESS_DB_PASSWORD: wp_pass
|
WORDPRESS_DB_PASSWORD: wp_pass
|
||||||
WORDPRESS_DB_NAME: wp_db
|
WORDPRESS_DB_NAME: wp_db
|
||||||
volumes:
|
volumes:
|
||||||
- ./wp-data/plugins:/var/www/html/wp-content/plugins
|
# - ./wp-data/plugins:/var/www/html/wp-content/plugins
|
||||||
- ./wp-data/uploads:/var/www/html/wp-content/uploads
|
- ./wp-data/uploads:/var/www/html/wp-content/uploads
|
||||||
- ./config/php.ini:/usr/local/etc/php/conf.d/custom.ini:ro
|
- ./config/php.ini:/usr/local/etc/php/conf.d/custom.ini:ro
|
||||||
- ./theme/images:/var/www/html/wp-content/uploads/theme-images:ro
|
- ./theme/images:/var/www/html/wp-content/uploads/theme-images:ro
|
||||||
|
|
@ -42,4 +42,5 @@ services:
|
||||||
WORDPRESS_DB_PASSWORD: wp_pass
|
WORDPRESS_DB_PASSWORD: wp_pass
|
||||||
WORDPRESS_DB_NAME: wp_db
|
WORDPRESS_DB_NAME: wp_db
|
||||||
volumes:
|
volumes:
|
||||||
- ./wp-data:/var/www/html # core files + composer.json
|
- ./composer.json:/var/www/html/composer.json:ro
|
||||||
|
- ./composer.lock:/var/www/html/composer.lock:ro
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue