In today's article I will describe the process of installing Akeneo PIM on the Ubuntu 16.04 system using a docker.
If you don't have a docker installed (including the docker-compose), you can do it according to the instructions here: https://docs.docker.com/install/linux/docker-ce/ubuntu/
Docker-compose can be installed with commands:
curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose
Let's just start the Akeneo PIM. We start by cloning the repository:
git clone https://github.com/akeneo/pim-community-standard.git
As we can see, Akeneo has already prepared a docker-compose.yml file for us, which will significantly affect our workload.
To start with, we have to decide which port we will have access to our Akeneo PIM instance. I work on an environment dedicated for PIM, so I will use the standard port 80. If another service already occupies this port with you, choose another (the popular choice will be 8080 or 8888).
docker-compose.yml file prepared by Akeneo, the port is defined by the variable
DOCKER_PORT_HTTP. So we can set our chosen port with a command:
We download remote docker images with a command:
Now we have to take care of the basic configuration options for our PIM, we copy the symfony configuration file:
cp app/config/parameters.yml.dist app/config/parameters.yml
and we're changing to use the docking environment. My file finally looks like this (the production version should of course have better passwords):
parameters: database_driver: pdo_mysql database_host: mysql database_port: ~ database_name: akeneo_pim database_user: akeneo_pim database_password: akeneo_pim locale: en secret: ThisTokenIsNotSoSecretChangeIt product_index_name: akeneo_pim_product product_model_index_name: akeneo_pim_product_model product_and_product_model_index_name: akeneo_pim_product_and_product_model index_hosts: 'elastic:changeme@elasticsearch:9200'.
We also need to take care of the rights for our catalogue. All operations on the containers will be done with the user docker. The easiest way to ensure that our system will work in terms of permissions is to modify permissions and assign files to the docker group and to allow writing to the group:
chgrp docker . -R chmod g+w . -R
Now we can start our containers:
docker-compose up -d
We are only a few clicks away from success. Akeneo has prepared 2 scripts for us:
We're running both. At the first one we'll probably get a message that we have to use our github's token to jump over the repository boundaries. We log on to github.com and then go to the link provided in the console. It looks like this: https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+X-Coding+2018-07-25+1356
Copy the displayed token and paste it into the console (the token is saved in the github account, but it is not possible to see it later, we can simply generate another token).
After completing this process, we can log in to our Akeneo PIM instance. The default data is: admin/admin.