Вопрос

I have successfully installed PWA-studio with Magento 2.3. But I am not able to run it on production mode on a Ubuntu 18.04 LTS server so that we can access the PWA remotely but I am always able to start the application in development mode which only accessible locally.

How I can configure my server as well as the PWA-studio so that we can access the application remotely?

Это было полезно?

Решение

  1. git clone https://github.com/magento-research/pwa-studio.git
  2. cd pwa-studio
  3. npm install
  4. cp packages/venia-concept/.env.dist packages/venia-concept/.env
  5. edit and change MAGENTO_BACKEND_URL in packages/venia-concept/.env
  6. In pwa-studio folder run: npm run build && NODE_ENV=production PORT=8000 npm run stage:venia

It will start the server on port 8000.

I used PM2 to manage node services.

(cd packages/venia-concept/ && NODE_ENV=production PORT=8000 node server.js)

Then I made Nginx proxy to pass connection from 8000 to 80 and 443

Hope it helps.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с magento.stackexchange
scroll top