Prestashop and docker#
Deploy our version of PrestaShop from a custom Docker image.#
Note: This guide is intended for use on a cPouta VM environment! If you haven’t already deployed a VM in cPouta, refer to this guide to set up the VM, obtain a floating IP, and open the necessary ports for external access: Instructions for installing virtual machine(s) in cPouta
-
Set Up the MySQL Container:
-
Docker will download the
mysql:5.7image if it’s not already on your VM. -
Replace
<your-password>and<your-user>with your MySQL credentials. -
The database server is
172.17.0.1, and we are exposing port3307for it.
-
-
Pull the Custom PrestaShop Image:
-
In the
presta-shop-service-xrepository, go toDeploy --> Container Registry. -
Under
CLI Commands, if you don’t see adocker pullcommand, you can modify thedocker pushcommand by replacingpushwithpull. -
Replace placeholders marked with
xwith your unique identifiers.
-
-
Run the PrestaShop Container:
-
Replace
<your-floating-ip>with your cPouta floating IP, and<prestashop-image-id>with the ID of the PrestaShop image that you pulled from the registry. You can look up theimage idby executing the following command:
-
-
The example below uses port
8888for external access, but you can use any other available port. To open the port for an external access, do the following on the cPouta portal:1. Go to `Network -> Security groups`. 2. Choose the group that is assigned to your vm and press `Manage Rules`. 3. Press `Add Rule` and add the desired port to the `Port` text box, other settings can be left at default. 4. Finally, click `Add`. Refer to the aforementioned guide for more detailed explanation on security groups: [Instructions for installing virtual machine(s) in cPouta](https://wimma-capstone.pages.labranet.jamk.fi/support-material/3.%20OPS/guides-and-technologies/CSC%20and%20cPouta/install-csc-cpouta-virtual-machine/#3-create-a-new-security-group) -
Go to the installation wizard and setup the website. See this guide on PrestaShop wizard setup: PrestaShop Installation GUI