2024-10-16 08:20:07 +02:00
|
|
|
# Usage
|
|
|
|
|
|
|
|
This project uses [Deployer](https://deployer.org/) for scripted installation
|
|
|
|
|
|
|
|
## Preparation
|
|
|
|
|
2024-10-18 16:46:34 +02:00
|
|
|
To setup the customer repository, see [provisioning](provisioning.md).
|
|
|
|
|
|
|
|
### Server setup
|
2024-10-16 08:20:07 +02:00
|
|
|
|
|
|
|
Install Composer.
|
|
|
|
|
|
|
|
Clone the repository into a separate directory (`deployer` for example) on your server and checkout this branch.
|
|
|
|
|
2024-10-18 16:46:34 +02:00
|
|
|
Run `composer install`.
|
2024-10-16 08:20:07 +02:00
|
|
|
|
|
|
|
Add an alias for the deployer command: `alias dep='/usr/local/php8.2/bin/php /home/XXX/deployer/vendor/bin/dep'`. Load the changed configuration.
|
|
|
|
|
2024-10-18 16:46:34 +02:00
|
|
|
Change project settings in the `inventory.yml`.
|
2024-10-16 08:20:07 +02:00
|
|
|
Create a deploy key (if it's not exist). Set it in the repository settings.
|
2024-10-18 16:46:34 +02:00
|
|
|
Commit changed files.
|
2024-10-16 08:20:07 +02:00
|
|
|
|
|
|
|
### Update Deployer
|
|
|
|
|
|
|
|
- `cd deployer`
|
|
|
|
- `composer update`
|
2024-10-17 08:55:37 +02:00
|
|
|
- `commit changes`
|
2024-10-16 08:20:07 +02:00
|
|
|
|
|
|
|
## Project
|
|
|
|
|
|
|
|
### Deployment
|
|
|
|
|
|
|
|
- `cd deployer`
|
2024-10-17 08:55:37 +02:00
|
|
|
- `dep deploy [stage]`
|
2024-10-16 08:20:07 +02:00
|
|
|
|
|
|
|
### Rollback
|
|
|
|
|
|
|
|
... in case of errors after successful deployment
|
|
|
|
|
|
|
|
This command set `current` directory to previous deployment:
|
|
|
|
|
2024-10-17 08:55:37 +02:00
|
|
|
- `dep rollback [stage]`
|
2024-10-16 08:20:07 +02:00
|
|
|
|
|
|
|
## Available tasks
|
|
|
|
|
2024-10-25 09:47:07 +02:00
|
|
|
- dep `shop:version` [stage] - show version of current OXID installation
|
|
|
|
- dep `shop:migrate` [stage] - run all database migrations
|
2024-10-18 16:46:34 +02:00
|
|
|
- dep `setup:createDbConfig` [stage] - generate database configuration file
|
2024-10-17 08:55:37 +02:00
|
|
|
- dep `list`- list all available commands
|
2024-10-16 08:20:07 +02:00
|
|
|
|
2024-10-17 08:55:37 +02:00
|
|
|
### work in progress
|
2024-10-25 09:47:07 +02:00
|
|
|
- dep `duplicateDatabase` [stage] - dump contents from source database (live) to destination database (stage) and replace live to stage URLs
|