# Reflect installer Run this script from a git repository to automatically install and configure Reflect as a git submodule to your project. > [!IMPORTANT] > The script will only run in environments with Bash and `coreutils` installed (for now). # Prerequisite A MariaDB or MySQL server with at least `SELECT` rights granted to a database table. (`SELECT`, `INSERT`, `UPDATE`, and `DELETE` rights to this table are required if you wish to manage your Reflect configuration through REST) # Get started 1. Create a git repository for your project. 2. Create a new empty MariaDB/MySQL database table. 3. Run this command from the root directory of your project. ```sh curl -fsSL https://codeberg.org/reflect/install/raw/branch/master/install.sh | bash ``` 4. Follow the steps in the installer. That's it! # Arguments You can pass optional named arguments to this script for headless installation of Reflect. ### `--install` - Don't install, only configure Reflect ```sh ./install.sh --install=n ``` Pass `--install=n` to prevent download and installation of the Reflect git submodule. Use this option if you're version controlling Reflect from your project repository. ### `--overwrite` - Overwrite existing configuration files ```sh ./install.sh --example=n ``` Pass `--overwrite=y` to overwrite all existing Reflect configuration files. ## Endpoints ### `--dir` - Installation directory ```sh ./install.sh --dir="/path/to/project" ``` Pass a `--dir` argument with a value of a directory Reflect should consider its [`root_path`](https://reflect.vlw.se/docs/Reference/Env#root_path). ### `--endpoints` - Reflect endpoint directory ```sh ./install.sh --endpoints="api" ``` Pass an `--endpoints` argument with a value of a directory relative to [`root_path`](https://reflect.vlw.se/docs/Reference/Env#root_path) where Reflect endpoint directories are stored. ### Database ### `--db` - Reflect database table ```sh ./install.sh --db="reflect" ``` Pass a `--db` argument with a value of a database table that Reflect should use when connecting to you MariaDB/MySQL server. ### `--host` - Reflect database hostname ```sh ./install.sh --host="/path/to/project" ``` Pass a `--host` argument with a value of a fully qualified hostname that Reflect should use when connecting to you MariaDB/MySQL server. ### `--user` - Reflect database user ```sh ./install.sh --user="www-data" ``` Pass a `--user` argument with a value of a username that Reflect should use when connecting to you MariaDB/MySQL server. ### `--password` - Reflect database password ```sh ./install.sh --password="mypassword" ``` Pass a `--password` argument with a value of a password that Reflect should use when connecting to you MariaDB/MySQL server. #### Disable password authentication ```sh ./install.sh --password=null ``` Pass "null" to this argument to disable password authentication ### Database seeding ### `--seed_host` - Database hostname for seeding ```sh ./install.sh --seed_host="/path/to/project" ``` Pass a `--host` argument with a value of a fully qualified hostname that will be used by this script to seed the database. ### `--seed_user` - Database user for seeding ```sh ./install.sh --seed_user="www-data" ``` Pass a `--user` argument with a value of a username that will be used by this script to seed the database. ### `--seed_password` - Database password for seeding ```sh ./install.sh --seed_password="mypassword" ``` Pass a `--password` argument with a value of a password that will be used by this script to seed the database. #### Disable password authentication ```sh ./install.sh --seed_password=null ``` Pass "null" to this argument to disable password authentication