Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit c4d89d4

Browse files
authored
Merge pull request #2568 from janmyszkier/patch-4
Add information on what to do for images to work when you put vue-storefront-api on a different server
2 parents 87e6f42 + 489eefb commit c4d89d4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/guide/basics/recipes.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,5 +267,13 @@ Execute the following line on your project's root folder:
267267

268268
The code basically looks into all project files for all ```i18n.t('some string')``` and ```$t('some string') ``` occurrences, parses an extracts the quoted text of each occurrence, and saves it into a pipe-separated CSV file, which you might help you to get your missing translations.
269269

270+
## Running vue-storefront-api on a different machine than magento / images not working
271+
When you separate vue-storefront-api and magento2 by putting them on different servers, it is necessary to link the vue-storefront-api machine with magento media folder via network folder. `sshsfs` is suggested for this.
272+
Once the network connection is established, the correct folder needs to be pointed in the vue-storefront-api config
273+
```
274+
"assetPath": "/../var/magento2-sample-data/pub/media",
275+
```
276+
It is necessary for the correct product image creation by the vue-storefront-api. If this is not set corectly, images will just be placeholders regardless the fact the rest of the setup works and you can see products and categories correctly synced.
277+
270278
## Syncing magento and vue-storefront-api servers / Fix for "An error occurred validating the nonce"
271279
There might be an issue with JWT token validation if one of the servers is more than 600 seconds behind the other. The 600 seconds limit is defined on Magento side by its `\Magento\Integration\Model\Oauth\Nonce\Generator::TIME_DEVIATION`. To fix this issue you need to make sure both severs `date` command show the same datetime (or both at least below 10 minute difference). This can be done by utilizing `tzdata` package (sudo dpkg-reconfigure tzdata) or setting it directly with `date` package (e.g: `sudo date --set "23 Mar 2019 12:00:00"`, but providing the current datetime)

0 commit comments

Comments
 (0)