Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
phd5-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dmstr
phd5-app
Commits
67e089c2
Commit
67e089c2
authored
Apr 19, 2023
by
Tobias Munk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed asset building, fixed config loader for common-debug, use debug in all app-types (if enabled)
parent
2f216935
Pipeline
#76829
passed with stage
in 10 minutes and 9 seconds
Changes
5
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
88 additions
and
83 deletions
+88
-83
Dockerfile
Dockerfile
+1
-1
common-debug.php
config/common-debug.php
+0
-0
common.php
config/common.php
+9
-2
main.php
config/main.php
+1
-1
composer.lock
src/composer.lock
+77
-79
No files found.
Dockerfile
View file @
67e089c2
...
...
@@ -54,7 +54,7 @@ VOLUME /app/runtime /app/web/assets /mnt/storage
# Build assets (skipped on first build in dist-upgrade)
RUN if
[
-z
"
$BUILD_NO_INSTALL
"
]
;
then
\
APP_NO_CACHE
=
1
APP_LANGUAGES
=
en
APP_USER_FROM_EMAIL
=
build@Dockerfile
APP_ADMIN_EMAIL
=
build@Dockerfile yii asset/compress config/assets.php web/bundles/config.php
;
\
PHP_USER_ID
=
0
APP_NO_CACHE
=
1
APP_LANGUAGES
=
en
APP_USER_FROM_EMAIL
=
build@Dockerfile
APP_ADMIN_EMAIL
=
build@Dockerfile yii asset/compress config/assets.php web/bundles/config.php
;
\
fi
# Install crontab from application config
...
...
config/
web
-debug.php
→
config/
common
-debug.php
View file @
67e089c2
File moved
config/common.php
View file @
67e089c2
...
...
@@ -102,13 +102,20 @@ if (getenv('MYSQL_ATTR_SSL_CA')) {
// update Redis increment counter according to queue_manager db (workaround)
Event
::
on
(
Queue
::
class
,
Queue
::
EVENT_BEFORE_PUSH
,
function
(
$event
)
{
// added directly to the SQL query, since param binding
$table_name
=
getenv
(
'DATABASE_TABLE_PREFIX'
)
.
'queue_manager'
;
if
(
Yii
::
$app
->
cache
->
get
(
'queue_id_synced'
)
!==
true
)
{
$lastQueueIdSql
=
<<<SQL
SELECT `AUTO_INCREMENT`
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME
= '{table_prefix}queue_manager
'
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME
= '{$table_name}
'
SQL;
$lastModelId
=
Yii
::
$app
->
db
->
createCommand
(
$lastQueueIdSql
,
[
'{table_prefix}'
=>
getenv
(
'DATABASE_TABLE_PREFIX'
)])
->
queryScalar
();
$lastModelId
=
Yii
::
$app
->
db
->
createCommand
(
$lastQueueIdSql
)
->
queryScalar
();
if
(
!
is_int
(
$lastModelId
))
{
throw
new
\yii\db\Exception
(
"Invalid increment (
{
$lastModelId
}
) for Redis queue"
);
}
Yii
::
$app
->
redis
->
set
(
"queue.message_id"
,
$lastModelId
);
Yii
::
$app
->
cache
->
set
(
'queue_id_synced'
,
true
);
Yii
::
info
(
"Synced redis queue id with database (
$lastModelId
)"
);
...
...
config/main.php
View file @
67e089c2
...
...
@@ -41,6 +41,7 @@ return call_user_func(function () {
"
{
$configDir
}
/"
.
APP_TYPE
.
'.php'
=>
true
,
"
{
$configDir
}
/common-"
.
YII_ENV
.
'.php'
=>
false
,
"
{
$configDir
}
/"
.
APP_TYPE
.
'-'
.
YII_ENV
.
'.php'
=>
false
,
"
{
$configDir
}
/common-"
.
((
YII_DEBUG
)
?
'debug'
:
'release'
)
.
'.php'
=>
false
,
"
{
$configDir
}
/"
.
APP_TYPE
.
'-'
.
((
YII_DEBUG
)
?
'debug'
:
'release'
)
.
'.php'
=>
false
,
];
...
...
@@ -55,7 +56,6 @@ return call_user_func(function () {
// Merge configurations
$config
=
[];
//var_dump($configFiles);exit;
Yii
::
trace
(
$configFiles
,
__METHOD__
);
foreach
(
$configFiles
as
$file
=>
$isRequired
)
{
if
(
!
is_file
(
$file
))
{
...
...
src/composer.lock
View file @
67e089c2
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment