-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make the PullPreview user configurable. (#55)
- Loading branch information
Showing
5 changed files
with
35 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -309,9 +309,12 @@ There are additional settings in the `transmorpher.php` config file. | |
Media always belongs to a user. To easily create one, use the provided command: | ||
|
||
```bash | ||
php artisan create:user <name> <email> | ||
php artisan create:user <name> <email> <api_url> | ||
``` | ||
|
||
The server sends notifications to the api url, for example, video transcoding information. | ||
For our standard laravel client implementation, this is: `https://example.com/transmorpher/notifications`. | ||
|
||
This command will provide you with a [Laravel Sanctum](https://laravel.com/docs/11.x/sanctum) token, which has to be | ||
written in the `.env` file of a client system. | ||
> The token will be passed for all API requests for authorization and is connected to the corresponding user. | ||
|
@@ -486,9 +489,11 @@ For more information, take a look at the PullPreview section of the [github-work | |
App-specific GitHub Secrets: | ||
|
||
- PULLPREVIEW_APP_KEY | ||
- PULLPREVIEW_TRANSMORPHER_SIGNING_KEYPAIR | ||
- PULLPREVIEW_TRANSMORPHER_AUTH_TOKEN | ||
- PULLPREVIEW_TRANSMORPHER_AUTH_TOKEN_HASH | ||
- PULLPREVIEW_SODIUM_KEYPAIR | ||
- PULLPREVIEW_SANCTUM_AUTH_TOKEN | ||
- PULLPREVIEW_SANCTUM_AUTH_TOKEN_HASH | ||
- PULLPREVIEW_USER_NAME | ||
- PULLPREVIEW_USER_EMAIL | ||
|
||
#### Companion App | ||
|
||
|
@@ -505,6 +510,12 @@ php artisan create:user pullpreview [email protected] http://pullpreview.t | |
Take the hash of the token from the `personal_access_tokens` table and save it to GitHub secrets. The command also provides a `TRANSMORPHER_AUTH_TOKEN`, which should be stored | ||
securely to use in client systems. | ||
|
||
#### Using your custom PullPreview environment | ||
|
||
In addition to the GitHub Secrets, you'll need to set the `CLIENT_CONTAINER_NAME` env variable for the Transmorpher server. | ||
|
||
You may use the `CLIENT_NOTIFICATION_ROUTE` env variable if you have a custom notifications url, which differs from the default client implementation. | ||
|
||
## License | ||
|
||
The Transmorpher media server is licensed under the [MIT license](https://opensource.org/licenses/MIT). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,12 @@ class PullpreviewSeeder extends Seeder | |
*/ | ||
public function run(): void | ||
{ | ||
Artisan::call('create:user pullpreview [email protected] http://amigor/transmorpher/notifications'); | ||
Artisan::call('create:user', [ | ||
'name' => env('SEED_USER_NAME'), | ||
'email' => env('SEED_USER_EMAIL'), | ||
'api_url' => sprintf('http://%s/%s', env('CLIENT_CONTAINER_NAME'), env('CLIENT_NOTIFICATION_ROUTE', 'transmorpher/notifications')), | ||
'--password' => env('SEED_USER_PASSWORD') | ||
]); | ||
|
||
DB::table('personal_access_tokens')->where('id', 1)->update(['token' => env('TRANSMORPHER_AUTH_TOKEN_HASH')]); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters