Skip to content

Commit 484cd46

Browse files
committed
refactor(docs): streamline Laravel application setup instructions
1 parent c5e05ab commit 484cd46

File tree

1 file changed

+8
-21
lines changed

1 file changed

+8
-21
lines changed

docs/applications/laravel.md

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -48,27 +48,13 @@ nixPkgs = ["...", "python311Packages.supervisor"]
4848

4949
[phases.build]
5050
cmds = [
51-
"mkdir -p /var/log",
52-
"mkdir -p /app/storage/framework/{views,cache,sessions}",
53-
"mkdir -p /app/bootstrap/cache",
5451
"mkdir -p /etc/supervisor/conf.d/",
5552
"cp /assets/worker-*.conf /etc/supervisor/conf.d/",
5653
"cp /assets/supervisord.conf /etc/supervisord.conf",
5754
"chmod +x /assets/start.sh",
58-
"chown -R www-data:www-data /var/log /app/storage /app/bootstrap/cache"
5955
"..."
6056
]
6157

62-
[phases.postbuild]
63-
cmds = [
64-
"php artisan migrate --force",
65-
"npm run build",
66-
"php artisan config:cache",
67-
"php artisan route:cache",
68-
"php artisan queue:work"
69-
]
70-
dependsOn = ["build"]
71-
7258
[start]
7359
cmd = '/assets/start.sh'
7460

@@ -136,7 +122,7 @@ autostart=true
136122
autorestart=true
137123
stopasgroup=true
138124
killasgroup=true
139-
numprocs=1
125+
numprocs=12
140126
startsecs=0
141127
stopwaitsecs=3600
142128
stdout_logfile=/var/log/worker-laravel.log
@@ -197,10 +183,11 @@ http {
197183
add_header X-Content-Type-Options "nosniff";
198184
199185
client_max_body_size 35M;
200-
186+
201187
index index.php;
202-
188+
203189
charset utf-8;
190+
204191
205192
$if(NIXPACKS_PHP_FALLBACK_PATH) (
206193
location / {
@@ -211,14 +198,14 @@ http {
211198
try_files $uri $uri/ /index.php?$query_string;
212199
}
213200
)
214-
201+
215202
location = /favicon.ico { access_log off; log_not_found off; }
216203
location = /robots.txt { access_log off; log_not_found off; }
217-
204+
218205
$if(IS_LARAVEL) (
219206
error_page 404 /index.php;
220207
) else ()
221-
208+
222209
location ~ \.php$ {
223210
fastcgi_pass 127.0.0.1:9000;
224211
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
@@ -227,7 +214,7 @@ http {
227214
228215
fastcgi_param PHP_VALUE "upload_max_filesize=30M \n post_max_size=35M";
229216
}
230-
217+
231218
location ~ /\.(?!well-known).* {
232219
deny all;
233220
}

0 commit comments

Comments
 (0)