feat: improve install action
Test Action / Test Base Modules Requires PHP (push) Failing after 10m29s
Test Action / Test Base Modules Installation (push) Failing after 10m31s
Test Action / Test Node (push) Failing after 10m37s
Test Action / Test Build Command (push) Failing after 14m37s
Test Action / Test Custom Server Path (push) Failing after 15m23s
Test Action / Test All Components (push) Failing after 15m25s
Test Action / Test nginx (push) Failing after 15m27s
Test Action / Test Database Configuration (push) Failing after 15m33s
Test Action / Test PHP (push) Failing after 15m35s
Test Action / Test Base Modules Requires PHP (push) Failing after 10m29s
Test Action / Test Base Modules Installation (push) Failing after 10m31s
Test Action / Test Node (push) Failing after 10m37s
Test Action / Test Build Command (push) Failing after 14m37s
Test Action / Test Custom Server Path (push) Failing after 15m23s
Test Action / Test All Components (push) Failing after 15m25s
Test Action / Test nginx (push) Failing after 15m27s
Test Action / Test Database Configuration (push) Failing after 15m33s
Test Action / Test PHP (push) Failing after 15m35s
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -82,6 +82,57 @@ jobs:
|
||||
npm run test:integration
|
||||
```
|
||||
|
||||
### With Database Configuration
|
||||
|
||||
Point the checked-out server at a database (e.g. a `mongo` service container) and write the value into `config/system.php` before dependencies or base modules are installed:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
mongo:
|
||||
image: mongo:7
|
||||
ports:
|
||||
- 27017:27017
|
||||
|
||||
steps:
|
||||
- name: Install server with database configuration
|
||||
uses: Nodarx/action-server-install@v1
|
||||
with:
|
||||
install-php: 'true'
|
||||
database-uri: 'mongodb://127.0.0.1:27017/?tls=false'
|
||||
database-name: 'ktrix_ci'
|
||||
app-environment: 'test'
|
||||
```
|
||||
|
||||
Any override left blank keeps the value already committed in `config/system.php`.
|
||||
|
||||
### With Base Modules (Password Authentication)
|
||||
|
||||
`install-base-modules` clones the password authentication provider module (from `base-modules-repository`, via [action-module-install](https://git.ktrix.dev/Nodarx/action-module-install)), then installs and enables it with `bin/console`. This requires PHP and a reachable, configured database:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
mongo:
|
||||
image: mongo:7
|
||||
ports:
|
||||
- 27017:27017
|
||||
|
||||
steps:
|
||||
- name: Install server with base modules
|
||||
uses: Nodarx/action-server-install@v1
|
||||
with:
|
||||
install-php: 'true'
|
||||
database-uri: 'mongodb://127.0.0.1:27017/?tls=false'
|
||||
database-name: 'ktrix_ci'
|
||||
install-base-modules: 'true'
|
||||
|
||||
- name: Provision a tenant and user for testing
|
||||
run: |
|
||||
cd server
|
||||
php bin/console tenant:create ci.test --identifier ci
|
||||
php bin/console user:create ci tester@ci.test
|
||||
php bin/console user:password ci tester@ci.test 'Sup3r-Secret!'
|
||||
```
|
||||
|
||||
### With Custom nginx Configuration
|
||||
|
||||
```yaml
|
||||
@@ -159,6 +210,27 @@ jobs:
|
||||
|-------|-------------|----------|---------|
|
||||
| `nginx-config` | Path to nginx configuration file | No | `''` |
|
||||
|
||||
### Server Settings Configuration
|
||||
|
||||
Overrides are written into the checked-out `config/system.php`. Requires `install-php: 'true'`; any input left blank keeps the repository's committed default.
|
||||
|
||||
| Input | Description | Required | Default |
|
||||
|-------|-------------|----------|---------|
|
||||
| `database-uri` | MongoDB connection URI | No | `''` |
|
||||
| `database-name` | MongoDB database name | No | `''` |
|
||||
| `app-environment` | Application environment, e.g. `test` | No | `''` |
|
||||
| `security-salt` | Security salt | No | `''` |
|
||||
|
||||
### Base Modules
|
||||
|
||||
Delegates cloning to [action-module-install](https://git.ktrix.dev/Nodarx/action-module-install), then installs and enables the module via `bin/console`. Requires `install-php` and a reachable, configured database.
|
||||
|
||||
| Input | Description | Required | Default |
|
||||
|-------|-------------|----------|---------|
|
||||
| `install-base-modules` | Clone, install, and enable the base module set (currently: `authentication_provider_password`) | No | `false` |
|
||||
| `base-modules-repository` | Repository URL for the password authentication provider module | No | `https://git.ktrix.dev/Nodarx/authentication_provider_password` |
|
||||
| `base-modules-branch` | Branch, tag, or commit to check out for the password authentication provider module | No | `main` |
|
||||
|
||||
## Outputs
|
||||
|
||||
| Output | Description |
|
||||
@@ -168,6 +240,7 @@ jobs:
|
||||
| `node-installed` | Whether Node.js was installed (true/false) |
|
||||
| `php-installed` | Whether PHP was installed (true/false) |
|
||||
| `nginx-installed` | Whether nginx was installed (true/false) |
|
||||
| `base-modules-installed` | Whether the base module set was installed (true/false) |
|
||||
|
||||
## Best Practices
|
||||
|
||||
|
||||
Reference in New Issue
Block a user