@@ -132,7 +132,6 @@ export NGE_USER=${NGE_USER:-$USER}
132
132
export NGE_PUID=${NGE_PUID:- $UID }
133
133
export NGE_PGID=${NGE_PGID:- $(id -g)}
134
134
135
- export NGE_FILES=${NGE_FILES:- " " }
136
135
export NGE_EXPOSE_DASHBOARD=${NGE_EXPOSE_DASHBOARD:- 4040}
137
136
export NGE_EXPOSE_SERVER_HOST=${NGE_EXPOSE_SERVER_HOST:- " laravel-nge.site" }
138
137
export NGE_EXPOSE_SERVER_PORT=${NGE_EXPOSE_SERVER_PORT:- 8080}
@@ -160,28 +159,6 @@ function compose() {
160
159
" ${DOCKER_COMPOSE[@]} " $@
161
160
}
162
161
163
- # Define Docker Compose command prefix...
164
- if docker compose & > /dev/null; then
165
- DOCKER_COMPOSE=(docker compose)
166
- else
167
- DOCKER_COMPOSE=(docker-compose)
168
- fi
169
-
170
- if [ -n " $NGE_FILES " ]; then
171
- # Convert NGE_FILES to an array...
172
- IFS=' :' read -ra NGE_FILES <<< " $NGE_FILES"
173
-
174
- for FILE in " ${NGE_FILES[@]} " ; do
175
- if [ -f " $FILE " ]; then
176
- DOCKER_COMPOSE+=(-f " $FILE " )
177
- else
178
- echo " ${BOLD} Unable to find Docker Compose file: '${FILE} '${NC} " >&2
179
-
180
- exit 1
181
- fi
182
- done
183
- fi
184
-
185
162
EXEC=" yes"
186
163
if [ -z " $NGE_SKIP_CHECKS " ]; then
187
164
# Ensure that Docker is running...
206
183
# running APP_SERVICE with `compose run|exec`
207
184
function app_crun() {
208
185
if [ $ONCE == " no" ]; then
186
+ # run via new container
209
187
if [ -z " $NGE_USER " ]; then
210
188
echo " ${YELLOW} NGE_USER not set. Running with default user.${NC} " >&2
211
189
compose exec -it $APP_SERVICE $@
212
190
else
213
191
compose exec -it --user=$NGE_USER $APP_SERVICE $@
214
192
fi
215
193
else
194
+ # run via existing container
216
195
if [ -z " $NGE_USER " ]; then
217
196
echo " ${YELLOW} NGE_USER not set. Running with default user.${NC} " >&2
218
197
compose run --rm $APP_SERVICE $@
@@ -322,15 +301,15 @@ function bash() {
322
301
}
323
302
324
303
function root-shell() {
325
- rrun sh
304
+ app_rrun sh
326
305
}
327
306
328
307
function root-bash() {
329
- rrun bash
308
+ app_rrun bash
330
309
}
331
310
332
311
function tinker() {
333
- crun php artisan tinker
312
+ app_crun php artisan tinker
334
313
}
335
314
336
315
function expose() {
0 commit comments