File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -130,12 +130,13 @@ private function bringUpNayra($restart = false)
130130 if ($ status ) {
131131 $ this ->bringUpNayraContainer ();
132132 } else {
133-
133+ $ isHost = config ('app.nayra_docker_network ' ) === 'host ' ;
134+ $ portMapping = $ isHost ? '-e PORT= ' . $ this ->getNayraPort () . ' ' : '-p ' . $ this ->getNayraPort () . ':8080 ' ;
134135 exec ($ docker . " stop {$ instanceName }_nayra 2>&1 || true " );
135136 exec ($ docker . " rm {$ instanceName }_nayra 2>&1 || true " );
136137 exec (
137138 $ docker . ' run -d '
138- . ($ this ->getNayraPort () !== 8080 ? ' -p ' . $ this -> getNayraPort () . ' :8080 ' : '' )
139+ . ($ this ->getNayraPort () !== 8080 ? $ portMapping : '' )
139140 . '--name ' . $ instanceName . '_nayra '
140141 . (config ('app.nayra_docker_network ' )
141142 ? '--network= ' . config ('app.nayra_docker_network ' ) . ' '
You can’t perform that action at this time.
0 commit comments