Akeneo is an open source Product Information Management (PIM) system designed for retailers looking for efficient answers to their multichannel needs.
Platform.sh is a groundbreaking hosting and development tool for web applications. It extends a branch-merge workflow to infrastructure so that every branch can be tested as if it were in production, and scales for the largest sites.
This blog post marries these two solutions together.
- When setting up a new project on platform.sh, on the Where do you want to start? step select Import an existing site. Keep Importing your code pop-up temporarily open.
Download and extract Akeneo Standard Edition archive. Keep the content of
pim-community-standard-v1.2.11-icecat
directory (version number might differ), trash the rest. Init new git repository inside thepim-community-standard-v1.2.11-icecat
directory, add platform as a remote, add all Akeneo files.Download following platform.sh configuration files from https://github.com/platformsh/platformsh-examples/tree/symfony/standard-full:
.platform.app.yaml
.platform/routes.yaml
.platform/services.yaml
into their respective directories.
See Configuration platform doc for more information.
- Delete
app/config/parameters.yml.dist
. We won't be needing it. We won't be using Incenteev at all (see below).
Remove
app/config/parameters.yml
from.gitignore
. We want to have it in the repo. This will be our database configuration provider.ssh into your platform and execute:
php5 -r 'print_r(json_decode(base64_decode(getenv("PLATFORM_RELATIONSHIPS"))));'
Edit app/config/parameters.yml
and update all params to match shown platform.sh database relationship details. Most probably you will need to do the following changes:
- change
database_host
todatabase.internal
- change
database_name
tomain
- remove values from
database_user
anddatabase_password
Add updated app/config/parameters.yml
to git repository.
- Edit
composer.json
:
remove
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters"
both frompost-install-cmd
andpost-update-cmd
scriptsreplace
incenteev-parameters
inextra
section with:
"incenteev-parameters": {
"keep-outdated": true
},
See Managing your ignored parameters with Composer for more info.
- Edit
.platform.app.yaml
and add apc runtime extension (required by Akeneo):
runtime:
extensions:
- apc
- Edit
.platform.app.yaml
and configure following additional directories as writeables inmounts
section:
/app/archive
/app/config
/web/bundles
/app/uploads/product
/web/css
/web/js
- Copy whole
app/config
directory toapp/config.dist
:
cp -r app/config app/config.dist
This needs to be done because we have added a mount on app/config (to make it writeable), which shadows the original directory content - but we still need those files there, so we will just manually copy them from app/config.dist in the last step.
- If you haven't done it yet, commit and push everything.
ssh
to your platform, and manually go through all Akeneo installation steps:
- start with copying all original config files from app/config.dist to their proper directory (app/config):
cp app/config.dist/* app/config/
Once this is done, you can safely go through Akeneo installation steps.
- requirement check should display several tables with lots of OKs:
app/console pim:installer:check-requirements --env=prod
- create (or re-create) the database (obvious warning, this will drop all existing data):
app/console pim:installer:db --env=prod
- copy all assents (css, js, bundles) into their respective directories:
app/console pim:installer:assets --env=prod
- All should be done now - this is the step where you go to your platform project URL and admire the result!