-
Notifications
You must be signed in to change notification settings - Fork 23
Deploy on platform.sh
First, head to https://console.platform.sh/ and create an account if you don't have one.
The free testing of Platform.sh is suitable enough for testing Gally. Of course, we recommend purchasing a paid plan with them if you want to deploy into production.
Click on New Project then Create from scratch.
Choose a project Name and a region to deploy, and then click on Create project
Documentation for installing platformsh cli can be found here : https://docs.platform.sh/administration/cli.html#cli-command-line-interface
If you are starting from scratch and you just want to deploy quickly, simply clone the Gally repository :
git clone [email protected]:Elastic-Suite/gally.git
Optional : If you plan to develop on Gally locally before deploying, refer to the guide to install the project locally
platform project:set-remote <YOUR PSH PROJECT ID>
OR
git remote add platform <YOUR PSH PROJECT ID>@<YOUR PSH GIT REPO>
If you are a Gally Premium user, you've been provided with credentials that we will refer now to as "yourcustomername" and "yourpassword".
composer config -d api repositories.elasticsuite composer https://elasticsuite.repo.packagist.com/yourcustomername/
composer config -d api --auth http-basic.elasticsuite.repo.packagist.com yourcustomername yourpassword
composer require -d api gally/gally-premium --ignore-platform-reqs
And commit the composer.json, composer.lock, symfony bundle and symfony lock files.
git add api/composer.lock api/composer.json api/symfony.lock api/config/bundles.php
git commit -m 'Adding Gally Premium packages'
For security purposes, we don't recommend to commit the auth.json file but instead to store your composer credentials in a platform.sh env var :
platform variable:create --level project --name env:COMPOSER_AUTH \
--json true --visible-runtime false --sensitive true --visible-build true \
--value '{"http-basic": {"elasticsuite.repo.packagist.com": {"username": "token", "password": "<yourToken>"}}}'
platform environment:push --target main
OR
git push -u platform main
On the first deployment, you need to :
- connect on ssh to the "api" service on platform.sh
platform ssh
Then select "api" by inputing the proper number.
- Create your Gally user
bin/console gally:user:create
Your user should have the role : ROLE_ADMIN
- Initialize the default catalog structure
bin/console hautelook:fixtures:load
You will be able to get your Gally instance url with the following command.
platform url
Then head into the /login
page to access the Gally Back Office.
1. Getting started
2. Managing your content
3. Deploy on production