I am trying to simplify the installation of Prestashop by using docker containers. My issue is that the container must be API ready once loaded but I can’t find a way to enable this feature from docker-compose.
What I’m trying to accomplish:
- Enable Prestashop's Webservice
- Create a webservice key
- Create permissions for the webservice
- Be able to modify products, customers, addresses etc. from Postman
Things I have done so far:
services:
prestashopper:
image: prestashop/prestashop
ports:
- 8080:80
environment:
- PS_LANGUAGE=en
- PS_COUNTRY=CO
- PS_FOLDER_ADMIN=admin_folder_name
- PS_FOLDER_INSTALL=install_folder_name
- PS_INSTALL_AUTO=1
- PS_DOMAIN=localhost:8080
- PS_WEBSERVICE=1
command:
[
# php -r 'Configuration::updateValue('PS_WEBSERVICE', 1);'
# php -r '$$apiAccess = new WebserviceKey();',
# php -r '$$apiAccess->key = GENERATED_KEY;',
# php -r '$$apiAccess->save();',
]
What my research has told me:
Based on the documentation on the PrestaShop website, these commands can be done using PHP, however, I was unable to determine how to correctly run these PHP commands from a docker-compose setup
Also is it possible to modify the following from docker-compose
- Modify currency options
- Change shop's main activity