YAML Based Installation
Instead of the interactive CLI based installer, Apex allows for automated installation via a YAML file. This allows for instant deployment including installation of any desired packages, and setting of any desired configuration variables.
To use this method, simply ensure there's a install.yml
file located within the Apex installation directory. When you run the ./apex
command instead of entering the interactive installer, it will read the YAML file and complete the installation automatically.
There is a install_example.yml
file within the Apex installation directory as an example YAML install file. This is already configured for use the with Docker Installation if you would like to test.
YAML File Format
Key | Required | default | Description |
---|---|---|---|
domain_name | Yes | - | The domain name being installed on. |
enable_admin | No | 1 | A 10 or 0, defining whether or not to enable the administration panel. |
db | Yes | - | Array of SQL database information. See the below table for details. |
redis | No | localhost:6379 | Array containing the redis information, any / all variables are optional. Defaults to localhost:6379 with no password and db index of 0. Available variables within this array are: host, port, password, dbindex |
repos | No | - | One dimensional array of hostnames of any repositories to configure on the local machine. |
packages | No | - | One dimensional array of packages to install. |
config | No | - | Associative array of any configuration variables to set, keys being the configuration variable itself, and value being the value to set. |
db Array
The YAML file requires an associate array named db
, which has the following variables available:
Key | Required | Default | Notes |
---|---|---|---|
dbname | Yes | - | The name of the SQL database. |
user | Yes | - | The database username. |
password | No | - | The database password. |
host | No | localhost | The database host. |
port | No | 3306 | The database port |
Please note, if you would prefer to use either PostgreSQL or SQLite instead of mySQL, you will need to modify the file located at ~/boot/container.php, and update the DbInterface::class
item.
Sample YAML File
Below shows a sample YAML file.
domain_name: myhostname.com
redis:
password: my_redis_password
dbindex: 3
db:
dbname: apex
dbuser: myuser
password: my_db_password
repos:
- somehost.com:
packages:
- webapp
- users
- transaction
- support
- author/package
- author2/another-package
config:
"core:site_twitter": "https://twitter.com/client_username"
"core:site_facebook": "https://facebook.com/client_user"
Start Developing
Check out the Guides section for easy to follow guides to help you get started with Apex. The Develop Your First Package guide is an excellent starting point if you're new to Apex. If you ever have any questions or issues, feel free to ask on the /r/apexpl sub Reddit.