File tree Expand file tree Collapse file tree 5 files changed +148
-19
lines changed
Expand file tree Collapse file tree 5 files changed +148
-19
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,14 @@ APP_URL=http://localhost
66
77BCRYPT_ROUNDS=12
88
9- LOG_LEVEL=debug
10- LOG_CHANNEL=errorlog
9+ LOG_LEVEL=warning
10+ LOG_CHANNEL=stack
11+ LOG_STACK=errorlog,nightwatch
1112LOG_DEPRECATIONS_CHANNEL=errorlog
1213
14+ NIGHTWATCH_TOKEN=
15+ NIGHTWATCH_REQUEST_SAMPLE_RATE=0.1
16+
1317DB_CONNECTION=sqlite
1418DB_DATABASE=/var/www/html/storage/database.sqlite
1519
Original file line number Diff line number Diff line change 2020 "ext-hash" : " *" ,
2121 "ext-mbstring" : " *" ,
2222 "ext-openssl" : " *" ,
23+ "ext-pcntl" : " *" ,
2324 "ext-pcre" : " *" ,
2425 "ext-pdo" : " *" ,
2526 "ext-session" : " *" ,
2627 "ext-tokenizer" : " *" ,
2728 "ext-xml" : " *" ,
28- "ext-pcntl" : " *" ,
2929 "laravel/framework" : " ^12.0" ,
30+ "laravel/nightwatch" : " ^1.12" ,
3031 "laravel/tinker" : " ^2.10.1" ,
3132 "league/flysystem-aws-s3-v3" : " ^3.0"
3233 },
Original file line number Diff line number Diff line change @@ -28,6 +28,12 @@ elif [ "$1" = "worker" ]; then
2828 php artisan optimize
2929 fi
3030 set -- su -s /bin/sh -c " php artisan queue:work --tries=3 --timeout=1800" www-data
31+ elif [ " $1 " = " nightwatch" ]; then
32+ wait-for " ${PHP_HOST:? Missing PHP_HOST} :${PHP_PORT:? Missing PHP_PORT} " -t 60
33+ if [ " $APP_ENV " != " local" ]; then
34+ php artisan optimize
35+ fi
36+ set -- su -s /bin/sh -c " php artisan nightwatch:agent --listen-on 0.0.0.0:2407" www-data
3137fi
3238
3339exec " $@ "
Original file line number Diff line number Diff line change 1+ x-app : &app
2+ pull_policy : never
3+ build :
4+ dockerfile : containers/php/Dockerfile
5+ target : development
6+ args :
7+ UID : ${UID:-1000}
8+ GID : ${GID:-1000}
9+ restart : unless-stopped
10+ extra_hosts :
11+ - " host.docker.internal:host-gateway"
12+ volumes :
13+ - /etc/localtime:/etc/localtime:ro
14+ - .:/var/www/html
15+
116services :
217 nginx :
318 pull_policy : never
@@ -10,16 +25,33 @@ services:
1025 FPM_HOST : php
1126 FPM_PORT : 9000
1227 php :
13- pull_policy : never
14- build :
15- dockerfile : containers/php/Dockerfile
16- target : development
17- args :
18- UID : ${UID:-1000}
19- GID : ${GID:-1000}
20- restart : unless-stopped
21- extra_hosts :
22- - " host.docker.internal:host-gateway"
23- volumes :
24- - /etc/localtime:/etc/localtime:ro
25- - .:/var/www/html
28+ << : *app
29+ environment :
30+ NIGHTWATCH_INGEST_URI : nightwatch-agent:2407
31+ scheduler :
32+ << : *app
33+ user : root
34+ command : scheduler
35+ environment :
36+ PHP_HOST : php
37+ PHP_PORT : 9000
38+ worker :
39+ << : *app
40+ user : root
41+ command : worker
42+ environment :
43+ PHP_HOST : php
44+ PHP_PORT : 9000
45+ nightwatch-agent :
46+ << : *app
47+ user : root
48+ command : nightwatch
49+ environment :
50+ PHP_HOST : php
51+ PHP_PORT : 9000
52+ healthcheck :
53+ test : php artisan nightwatch:status
54+ interval : 30s
55+ timeout : 5s
56+ retries : 3
57+ start_period : 5s
You can’t perform that action at this time.
0 commit comments