-
Notifications
You must be signed in to change notification settings - Fork 21
Deploy bare metal
Pierre Gauthier edited this page Nov 21, 2024
·
2 revisions
⚠️ Please note that the Makefile is meant to be used on local environment for development purposes. It must not be used in production environment.
-
Deploy the source on your environment
-
Initialize environment variables on your environment (via
.env
file or any feature your system has to define env vars):-
SERVER_NAME
: The domain on which gally should respond -
APP_ENV
: The environment in which the application runs -
APP_SECRET
: This is a string that should be unique to your application and it's commonly used to add more entropy to security related operations. -
POSTGRES_PASSWORD
: Password of the database
-
-
Optional: Install with premium packages
- Install gally/gally-premium composer package on your code base
- These files
api/composer.json
,api/composer.lock
andapi/bundles.json
should contain gally-premium bundles requirements at this point. - Add Gally composer credentials in a new environment variable
COMPOSER_AUTH
with this format :COMPOSER_AUTH='{"http-basic": {"elasticsuite.repo.packagist.com": {"username": "token", "password": "XXX"}}}'
-
Run the application:
docker compose -f compose.yml build --no-cache docker compose -f compose.yml up -d
-
Install the application (Only on the first deployment):
docker compose -f compose.yml run --rm php bin/console lexik:jwt:generate-keypair docker compose -f compose.yml exec php bin/console hautelook:fixtures:load
-
Create a new admin account (available roles are
ROLE_ADMIN
andROLE_CONTRIBUTOR
):docker compose -f compose.yml exec php bin/console gally:user:create
-
The application should be available from the port 443 of your server
⚠️ This method is only for testing purpose. If you need to properly add premium package on your production env, you need to install it on your development environment and then deploy your updated sources.
# Logout from backoffice
docker compose -f compose.yml exec php composer config repositories.gally-premium composer https://elasticsuite.repo.packagist.com/[YOUR_CUSTOMER_NAME]/
docker compose -f compose.yml exec php composer require gally/gally-premium:[REQUIRED_VERSION]
docker compose -f compose.yml cp php:/app/composer.json api/
docker compose -f compose.yml cp php:/app/composer.lock api/
docker compose -f compose.yml cp php:/app/symfony.lock api/
docker compose -f compose.yml cp php:/app/config/bundles.php api/config/
docker compose -f compose.yml build php
docker compose -f compose.yml up -d
docker compose -f compose.yml exec php bin/console cache:clear
1. Getting started
2. Managing your content
3. Deploy on production