Issue
I had a hard time to link 2 containers together and was advised to begin using docker-compose. So I build the following docker-compose file:
version: '2'
services:
db:
image: mysql:latest
volumes:
- "./.data/db:/var/lib/mysql"
restart: always
environment:
MYSQL_ROOT_PASSWORD: my-pass
MYSQL_DATABASE: prestashop
MYSQL_USER: my-shop
MYSQL_PASSWORD: my-pass
prestashop:
depends_on:
- db
image: prestashop/prestashop:latest
volumes:
- "./.data/themes:/var/www/html/themes"
- "./.data/modules:/var/www/html/modules"
- "./.data/override:/var/www/html/override"
links:
- db
ports:
- "10083:80"
restart: always
environment:
DB_SERVER: db
DB_NAME: prestashop
DB_USER: my-shop
DB_PASSWD: my-pass
This works very well and if I visit the page via a reverse nginx proxy I get the initial install wizard.
But if I add the persistent data volumes:
volumes:
- "./.data/themes:/var/www/html/themes"
- "./.data/modules:/var/www/html/modules"
- "./.data/override:/var/www/html/override"
The wizard will complain about many read/write access. Why is that? The internal volumes does have the proper chmod already I guess? So it is only a sync problem I think. But I tried to chmod or chown the .data folders, but without any success
Solution
I solved this issue. After docker-compose up -d I did copy the internal folders modules, themes and override to the host machine with docker cp
Because Prestashop will check if all files are available.
After copying you can run the prestashop install procedure.
Answered By - user3411864