You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/first-deploy.md
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,12 @@ Start by deploying using `php artisan deploy`. Unless you have some folders call
20
20
## 2️⃣ Point root path to current directory
21
21
Make sure your server's root path points to the `current` symlink. For example if your `deploy_path` is `var/www/domain.com`, your server configurations should point to `var/www/domain.com/current`.
22
22
23
-
Because the `current` directory is a symlink, you need to allow symlinks on nginx by adding `disable_symlinks off;` to your server block.
23
+
If you're using OPcache, you need to pass the realpath of the application instead of its symbolic link. Otherwise, PHP's OPcache may not properly detect changes to your PHP files. Add the following lines after the rest of your `fastcgi` configurations in the `location` block of your nginx configurations.
Copy file name to clipboardExpand all lines: docs/how-to-forge.md
+8-5Lines changed: 8 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -27,18 +27,21 @@ localhost()
27
27
* Combine with the `-a` (`--all`) option to skip any console interaction whilst using a maximum of features — npm, migrations, horizon, etc.
28
28
29
29
## Update web directory
30
-
31
30
Go to the *Meta* tab of your application page on Forge and change it to the `/current/public` directory.
32
31
33
32

34
33
35
-
## Allow symlinks on nginx
34
+
## Make OPcache work with symlinks
35
+
Next, you need to pass the real application path instead of the symlink path to PHP FPM. Otherwise, PHP's OPcache may not properly detect changes to your PHP files. Add the following lines after the rest of your `fastcgi` configurations in the `location` block of your nginx configurations.
36
36
37
-
Because the `current` directory is a symlink, you need to allow symlinks on nginx by adding `disable_symlinks off;` to your server block.

40
43
41
-

44
+

42
45
43
46
## Edit your deploy script
44
47
Your deploy script in Forge is now unnecessary since your whole deployment logic is define by Laravel Deployer. Replace it with the following script to deploy using Laravel Deployer when you deloy in Forge.
@@ -52,4 +55,4 @@ Now if you have *Quick Deploy* turned on, every time you push to your repository
52
55
53
56
## Extra things to configure
54
57
* If you wish to reload php-fpm after each deployment like Forge does by default, you will need to use the `fpm:reload` task and set up your version of php-fpm within the `php_fpm_service` option. Read more [here](how-to-reload-fpm.md).
55
-
* If you have a Daemon running Horizon in Forge, [read this](how-to-horizon.md) to make sure it restarts after each deployment.
58
+
* If you have a Daemon running Horizon in Forge, [read this](how-to-horizon.md) to make sure it restarts after each deployment.
Copy file name to clipboardExpand all lines: docs/troubleshooting.md
+9-3Lines changed: 9 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -17,18 +17,24 @@ Since Deployer uses `acl` by default to set up permissions for writable director
17
17
sudo apt-get install acl
18
18
```
19
19
20
-
## My changes don't show after a deployment.
20
+
## My changes don't show up after a deployment.
21
21
22
22
**Problem:**
23
23
24
24
You push some new commits and run `php artisan deploy` successfully but the changes don't seem to appear on your application.
25
25
26
26
**Solution:**
27
27
28
-
It is likely that your server configurations do not allow symlinks. Since the `current` folder is a symlink, it will not see it as linked to the newest release. To allow symlinks in your nginx configuration, add `disable_symlinks off;` to your server block.
29
-
28
+
Since we are using symlinks to link the `current` folder to the current release of your application, it is likely that OPcache does not properly detect changes to your PHP files. To fix this, you should pass the real application path instead of the path to the symlink to PHP FPM. Add the following lines after the rest of your `fastcgi` configuration in the `location` block of your nginx configurations.
0 commit comments