Skip to content
Snippets Groups Projects
Commit bfe45ebf authored by Kamil Manka's avatar Kamil Manka
Browse files

Clean up the image

parent a3bd7103
Branches
No related tags found
No related merge requests found
FROM ubuntu:14.04
MAINTAINER Kamil Manka <kamil.manka@seamless.se>
MAINTAINER Kamil Manka <kamil.manka@gmail.com>
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install unzip curl
......@@ -7,9 +7,6 @@ ADD run.sh /run.sh
RUN chmod +x /run.sh
RUN mkdir -p /var/www/html
# SEQR plugin directory
RUN mkdir -p /var/www/html/modules/seqr
# apache config
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
......
# seqr-prestashop-data
# ecommerce-prestashop-data
Docker data container for prestashop
## How to run this
Mapping local plugin dev directory to the Prestashop data container.
```bash
export DEV_DIR /home/yourhome/path/to/seqr/plugin
docker-compose up -d
docker run -e PS_VERSION=1.6.1.3 ikamman/ecommerce-prestashop-data
```
Your Prestashop site will be available on the **8080** port.
### Mounting /var/www/html to the local machine
## Available ports
* 8080: Prestashop site
* 3306: mysql database
* 9000: Xdebug extension for PHP debugging
```bash
## Prestashop database
docker run docker run -e PS_VERSION=1.6.1.3 -v /home/user/html:/var/www/html ikamman/ecommerce-prestashop-data
username: **root**
```
### Mounting only plugin directory to the local machine
```bash
docker run docker run -e PS_VERSION=1.6.1.3 -e PLUGIN_NAME=new_plugin -v /home/user/local_plugin:/var/www/html/new_plugin ikamman/ecommerce-prestashop-data
```
Please make sure that your **PLUGIN_NAME** match the destination directory name of the volume mounting
## Directory permissions
password:
The www-data is an owner/group of the /var/www/html container directory. If you're mounting this directory to the local file system make sure your www-data user/group exists in your system. The alternative is to grant access to ALL users on your local directory. This will allow the container process to write to it.
web:
image: seqr-ecommerce-php-55
ports:
- "8080:80"
- "3306:3306"
volumes_from:
- data
data:
image: seqr-prestashop-data
environment:
PS_VERSION: '1.6.1.3'
volumes:
- "${DEV_DIR}:/var/www/html/modules/seqr"
#!/bin/bash
if [ -z "$PS_VERSION"]; then
echo "Prestashop version not found. Please set up PS_VERSION variable properly."
exit 1
fi
curl -s -o /tmp/temp "https://www.prestashop.com/download/old/prestashop_$PS_VERSION.zip"
unzip -q /tmp/temp -d /tmp
cp -rf /tmp/prestashop/* /var/www/html
rm -rf /tmp/*
chown -R www-data:www-data /var/www
chmod -Rf 777 /var/www/html/modules/seqr
if [ -n "$PLUGIN_NAME" ]; then
chmod -Rf 777 /var/www/html/modules/$PLUGIN_NAME
fi
exec /bin/true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment