From fd35e5eb9d2b58adab0f746e0418213c31d3c914 Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer <reinhold@kainhofer.com> Date: Tue, 13 Oct 2015 23:58:46 +0200 Subject: [PATCH] Fix j3vm3: EXT AIO cannot be installed automatically... --- README.md | 38 ++++++++++++++++++++++++++++++++++++-- j3vm3/Dockerfile | 6 ++++-- j3vm3/docker-entrypoint.sh | 2 +- 3 files changed, 41 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cc06491..fbfcad8 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,9 @@ This mysql container can then be linked to the virtuemart container as described ```console -$ docker run --name some-virtuemart --link some-mysql:mysql -d opentools/virtuemart +$ docker run --name some-virtuemart --link some-mysql:mysql -d opentools/virtuemart:tag ``` +where `tag` is either `fullinstall` (for the VM 3.0.10 full installer on Joomla 2.5.28, including sample data) or `j3vm3` for an automatic installation of VM 3.0.10 on Joomla 3.x (but no sample data). The following environment variables are also honored for configuring your Joomla instance: @@ -62,7 +63,40 @@ $ docker run --name some-virtuemart -e JOOMLA_DB_HOST=10.1.2.3:3306 \ -e JOOMLA_DB_USER=... -e JOOMLA_DB_PASSWORD=... -d opentools/virtuemart:tag ``` +# Virtuemart 3.x on Joomla 2.5.28 (Full installer) + +The stock VirtueMart full installer provides a pre-configured Joomla 2.5.28 installation with sample data installed and the front end already set up with the cart, category and product pages. You can install it from the `opentools/docker-virtuemart:fullinstaller` tag: + +```console +$ docker run --name some-virtuemart --link some-mysql:mysql -d \ + -p 8080:80 opentools/virtuemart:fullinstaller +``` + +This will set up the database and the joomla/virtuemart files, but will leave the installation to you. Simply go to http://localhost:8080/ to run the installer. Unless you changed the defaults with the env variables listed above, the database credentials are: +- database host: mysql +- database: virtuemart +- database user: root +- database password: (the MYSQL_ROOT_PASSWORD given when the mysql container was created) + +# Virtuemart 3.x on Joomla 3.x (automated installation) + +There is no full installer for VirtueMart 3.x on Joomla 3.x, so this image installed Joomla 3.x and then the Virtuemart 3.x packages, which provide sample data, but do not set up the Joomla front end with the cart, category and product menus and pages. The installation of Joomla and Virtuemart can mostly be done automatically, so in this case, there is no need to go through the installer. However, to configure Joomla, you can give the database prefix, the site name, the admin user/password etc. as env variables when the container is created: + A typical installation of Joomla 3.x with VirtueMart 3.x will thus use a docker line like: ```console $ docker run --name=some-virtuemart -e JOOMLA_DB_NAME=joomla_j3vm3 -e JOOMLA_DB_PREFIX=vm3 -e JOOMLA_SITE_NAME="My VirtueMart Installation" --link some-mysql:mysql -p 8080:80 -d opentools/virtuemart:j3vm3 -``` \ No newline at end of file +``` + +Available env variables are: `JOOMLA_ADMIN_USER`, `JOOMLA_ADMIN_PASSWORD`, `JOOMLA_ADMIN_EMAIL`, `JOOMLA_SITE_NAME`, `JOOMLA_DB_PREFIX`. + +Joomla and Virtuemart itself can be set up automatically, but for technical reasons (Joomla does not have a clean separation of installation and GUI features), the Virtuemart EXT AIO cannot be installed automatically. So after installation, you need to go to Joomla's backend extensions page +``` +http://localhost:8080/administrator/index.php?option=com_installer&view=install``` +and install the Virtuemart EXT AIO package from the folder +``` +/usr/src/virtuemart/com_virtumart_ext_aio/ +``` + +# Sources +The docker files to build these images are available on github under the GPL: +https://github.com/open-tools/docker-virtuemart diff --git a/j3vm3/Dockerfile b/j3vm3/Dockerfile index f1b549c..82bcd8d 100644 --- a/j3vm3/Dockerfile +++ b/j3vm3/Dockerfile @@ -5,7 +5,7 @@ MAINTAINER Reinhold Kainhofer <reinhold@kainhofer.com> RUN a2enmod rewrite # Install PHP extensions -RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev zip unzip && rm -rf /var/lib/apt/lists/* \ +RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev zip unzip sudo && rm -rf /var/lib/apt/lists/* \ && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ && docker-php-ext-install gd RUN docker-php-ext-install mysqli @@ -22,7 +22,9 @@ RUN curl -o virtuemart.zip -SL http://dev.virtuemart.net/attachments/download/97 && mkdir /usr/src/virtuemart \ && unzip virtuemart.zip -d /usr/src/virtuemart \ && rm virtuemart.zip \ - && chown -R www-data:www-data /usr/src/virtuemart + && chown -R www-data:www-data /usr/src/virtuemart \ + && unzip /usr/src/virtuemart/com_virtuemart*_ext_aio.zip -d /usr/src/virtuemart/com_virtumart_ext_aio/ \ + && rm /usr/src/virtuemart/com_virtuemart*_ext_aio.zip # Copy init scripts and custom .htaccess COPY docker-entrypoint.sh /entrypoint.sh diff --git a/j3vm3/docker-entrypoint.sh b/j3vm3/docker-entrypoint.sh index a865492..0dd61d0 100755 --- a/j3vm3/docker-entrypoint.sh +++ b/j3vm3/docker-entrypoint.sh @@ -86,7 +86,7 @@ if [[ "$1" == apache2* ]]; then for p in /usr/src/virtuemart/*.zip; do - php ./cli/install-joomla-extension.php --package=$p + sudo -u www-data php ./cli/install-joomla-extension.php --package=$p done fi -- GitLab