mobile api changes + docker image basics

This commit is contained in:
Schneider Roland
2022-06-11 21:05:19 +02:00
parent 7e5efc2c7f
commit 067fc72ce4
207 changed files with 3803 additions and 130 deletions

View File

@@ -0,0 +1,22 @@
<?php
$config = [
'components' => [
'request' => [
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
'cookieValidationKey' => 'cutler_prod_mobileapi_UTVb6_cw5UgJ4jukRO3ftYIxGBUfTJJw',
],
],
];
//if (!YII_ENV_TEST) {
// // configuration adjustments for 'dev' environment
// $config['bootstrap'][] = 'debug';
// $config['modules']['debug'] = 'yii\debug\Module';
//
// $config['bootstrap'][] = 'gii';
// $config['modules']['gii'] = 'yii\gii\Module';
//}
return $config;

View File

@@ -0,0 +1,53 @@
<?php
use mobileapi\components\JwtValidationData;
use sizeg\jwt\Jwt;
$params = array_merge(
require(__DIR__ . '/../../common/config/params.php'),
require(__DIR__ . '/../../common/config/params-local.php'),
require(__DIR__ . '/params.php'),
require(__DIR__ . '/params-local.php')
);
return [
'id' => 'app-mobileapi',
'name' =>'Fitness recepció',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'controllerNamespace' => 'mobileapi\controllers',
'components' => [
'request' => [
'enableCsrfValidation'=>false,
'csrfParam' => '_csrf-mobileapi',
'parsers' => [
'application/json' => 'yii\web\JsonParser',
]
],
'user' => [
'identityClass' => 'common\models\MobileDevice',
'enableSession' => false,
'enableAutoLogin' => false,
'loginUrl' => null,
],
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
'errorHandler' => [
'errorAction' => 'site/error',
],
'jwt' => [
'class' => Jwt::class,
'key' => 'dianaveronika',
// You have to configure ValidationData informing all claims you want to validate the token.
'jwtValidationData' => JwtValidationData::class,
],
],
'params' => $params,
];

View File

@@ -0,0 +1,3 @@
<?php
return [
];

View File

@@ -0,0 +1,4 @@
<?php
return [
'adminEmail' => 'admin@example.com',
];