Hi Vincent, linked_dirs links directories from the shared/ path into the current release. This means as a rule that your public/ from Git will be replaced by one in shared/. I hope that clears up and misunderstanding from linked_dirs.
What were you hoping to achieve? On 12 Dec 2017 20:16, "Vincent G" <[email protected]> wrote: > Versions: > Ruby ruby 2.0.0p648 > Capistrano 3.10.1 (Rake Version: 12.3.0) > Rake / Rails / etc > Platform: > Working on.... Mac OS X > Deploying to... CentOS > > Hey, > > I am trying to understand how the linked_dirs work. i have the following > as an example > > append :linked_dirs, "storage", "node_modules", "vendor", "public" > > the above causes a few issues: > > 1. if i keep the "public" in the linked dirs, on initial deploy the public > folder is missing a lot of files that are present in the git repository. > For example, without the "public" listed in linked_dirs i get the following > tree inside current/public: > > [git@web003 current]$ ls -lh public/ > total 52K > drwxrwxr-x 3 git git 4.0K Dec 12 16:48 custom > -rw-rw-r-- 1 git git 0 Dec 12 16:48 favicon.ico > drwxrwxr-x 2 git git 4.0K Dec 12 16:48 fonts > drwxrwxr-x 4 git git 4.0K Dec 12 16:48 rsvp > drwxrwxr-x 2 git git 4.0K Dec 12 16:48 images > -rw-rw-r-- 1 git git 2.7K Dec 12 16:48 index.php > -rw-rw-r-- 1 git git 1.2K Dec 12 16:48 manifest.json > drwxrwxr-x 8 git git 4.0K Dec 12 16:48 maverick > -rw-rw-r-- 1 git git 26 Dec 12 18:43 mix-manifest.json > drwxrwxr-x 15 git git 4.0K Dec 12 18:43 modules > -rw-rw-r-- 1 git git 24 Dec 12 16:48 robots.txt > -rw-rw-r-- 1 git git 781 Dec 12 16:48 serviceWorker.js > drwxr-xr-x 4 git git 4.0K Dec 12 18:43 vendor > -rw-rw-r-- 1 git git 914 Dec 12 16:48 web.config > > > > With "public" set in linked_dirs i have the following directory tree in > current/public > > [git@web003 public]$ ls -lh > total 12K > -rw-rw-r-- 1 git git 26 Dec 12 17:16 mix-manifest.json > drwxrwxr-x 15 git git 4.0K Dec 12 17:16 modules > drwxr-xr-x 4 git git 4.0K Dec 12 17:16 vendor > > > > > There is a lot missing and i am not entirely sure why. Also > mix_manifest.js is a file that is generated and updated when we run some > compile scripts, i'd like that to be shared but it seems i can't add it to > linked_files since on initial deploy it does not exists and it returns an > error: > > 00:02 deploy:check:linked_files > ERROR linked file /var/www/xxx/shared/public/mix-manifest.json does > not exist on xxx > > 2. This is similar to the above just with node_modules > > If we share node_modules when trying to run npm run... it seems like it > can't find certain files for example > > npm run w-production // shortcut for: > > cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js > --progress --hide-modules > --config=node_modules/laravel-mix/setup/webpack.config.js > "--env.mixfile=build/w.mix" "--env.scss=1" > > if the node_modules is not shared that works just fine. if it's shared it > just compiles nothing, as it seems it can't really find the appropriate > files since the node_modules points to a symbolic link. > > > Any idea what can be done in the scenarios above? > > Thank You. > > > > -- > You received this message because you are subscribed to the Google Groups > "Capistrano" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web, visit https://groups.google.com/d/ > msgid/capistrano/67bfc00b-d7a3-436a-a8dc-18c8b93dc293%40googlegroups.com > <https://groups.google.com/d/msgid/capistrano/67bfc00b-d7a3-436a-a8dc-18c8b93dc293%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Capistrano" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/CAN_%2BVLXLu4kXRxr49fcj8AvuwdZC18Tdb_Zv96GRx6j%2B96wHcw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
