Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
laradock
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kerwin
laradock
Commits
ffce0f93
Commit
ffce0f93
authored
Aug 31, 2016
by
larryeitel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: ERROR: expr: syntax error #272
parent
a2d154c3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
xdebugPhpFpm
xdebugPhpFpm
+14
-4
No files found.
xdebugPhpFpm
View file @
ffce0f93
...
...
@@ -6,12 +6,21 @@
# Grab full name of php-fpm container
PHP_FPM_CONTAINER
=
$(
docker-compose ps |
grep
php-fpm |
cut
-d
" "
-f
1
)
# Grab OS type
if
[[
"
$(
uname
)
"
==
"Darwin"
]]
;
then
OS_TYPE
=
"OSX"
else
OS_TYPE
=
$(
expr
substr
$(
uname
-s
)
1 5
)
fi
xdebug_status
()
{
echo
'xDebug status'
# If running on Windows, need to prepend with winpty :(
if
[[
"
$(
expr
substr
$(
uname
-s
)
1 5
)
"
==
"MINGW"
]]
;
then
if
[[
$OS_TYPE
==
"MINGW"
]]
;
then
winpty docker
exec
-it
$PHP_FPM_CONTAINER
bash
-c
'php -v'
else
...
...
@@ -20,6 +29,7 @@ xdebug_status ()
}
xdebug_start
()
{
echo
'Start xDebug'
...
...
@@ -30,7 +40,7 @@ xdebug_start ()
# If running on Windows, need to prepend with winpty :(
if
[[
"
$(
expr
substr
$(
uname
-s
)
1 5
)
"
==
"MINGW"
]]
;
then
if
[[
$OS_TYPE
==
"MINGW"
]]
;
then
winpty docker
exec
-it
$PHP_FPM_CONTAINER
bash
-c
"
${
ON_CMD
}
"
docker restart
$PHP_FPM_CONTAINER
winpty docker
exec
-it
$PHP_FPM_CONTAINER
bash
-c
'php -v'
...
...
@@ -40,9 +50,9 @@ xdebug_start ()
docker restart
$PHP_FPM_CONTAINER
docker
exec
-it
$PHP_FPM_CONTAINER
bash
-c
'php -v'
fi
}
xdebug_stop
()
{
echo
'Stop xDebug'
...
...
@@ -52,7 +62,7 @@ xdebug_stop ()
# If running on Windows, need to prepend with winpty :(
if
[[
"
$(
expr
substr
$(
uname
-s
)
1 5
)
"
==
"MINGW"
]]
;
then
if
[[
$OS_TYPE
==
"MINGW"
]]
;
then
# This is the equivalent of:
# winpty docker exec -it laradock_php-fpm_1 bash -c 'bla bla bla'
# Thanks to @michaelarnauts at https://github.com/docker/compose/issues/593
...
...
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