ScandiPWA (deprecated)
User ManualGitHubSlack
  • ScandiPWA (deprecated)
  • React & PWA for dummies
    • Setting Up Environment and Talking Theory
    • Learning React Hands-on
    • Styling It
    • Learning ScandiPWA Way
  • START & UPGRADE
    • Linux Docker setup
    • Mac Docker setup
    • Setting up the theme with remote M2 server
    • Theme Upgrade to the latest version
    • Automated setup (BETA)
  • A TO Z OVERVIEW
    • Motivation
    • Challenges
    • File structure and UI components
    • Rewriting and Extending A Theme
  • DESCRIPTION OF CONTAINERS
    • Ngrok
  • FAQ
    • Development
    • Installation
    • Billing and license
    • Product support
    • What is PWA?
  • HOW-TO TUTORIALS - INTRODUCTORY
    • Base template
    • Connecting to the GraphQL resolver
    • Extension mechanism
    • Creating GraphQL resolver
    • Debugging and Inspecting
    • Setting Up Frontend
    • File Structure
    • Data Flow
    • Technology Stack
    • Changing environment
    • Theme Build and Configuration
    • Implementing Caching for New Caching Identities
    • Implementing a parent theme
  • HOW-TO TUTORIALS - INTERMEDIATE
    • Debugging in Chrome
    • Configuring XDebug
    • CLI in Docker
    • Postman & GraphQL Playground
    • VSCode Extensions
    • Plugins: implementing
    • Plugins: using and publishing
    • ESlint & StyleLint
    • How To Contribute
    • Migrating to a Newer Version
    • Installation on Existing Magento 2 Sever
    • BEM and Coding Standards
    • Tools of ScandiPWA
    • React Best Practices
  • FAQ
    • Untitled
Powered by GitBook
On this page
  • Supported Systems
  • Before you start
  • Automated Setup Repository
  • Linux Start
  • MacOS Start
  • FAQ
  • Database migration failed: manual action required / magento: command not found
  • SSL certificates
  • Please set COMPOSER_AUTH environment variable
  • 502 bad gateway
  • Port {port} is used problem
  • Set up from beginning (install demo again)
  • Elasticsearch dead
  • SSL container is dead
  • Other useful information
  • Stop demo
  • Delete some of demo docker images (others should be deleted manually)
  • Delete all the demo docker images (including ALL other docker images)
  • Aliases added by script
  • Something does not work?
  1. START & UPGRADE

Automated setup (BETA)

PreviousTheme Upgrade to the latest versionNextMotivation

Last updated 4 years ago

Supported Systems

  • Arch

  • Ubuntu (18.4, 19.10, 20.04)

  • Manjaro (20.0.3)

  • Linux Mint (19.10)

  • MacOS Catalina

Before you start

  1. Make sure you have a valid Magento 2 COMPOSER_AUTH set. This is an environment variable set on your host machine. To test if it is set, use:

env | grep COMPOSER_AUTH

If the output of this command is empty, or, if the output (JSON object) does not contain "repo.magento.com" key, you need to set / update the environment variable.

2. If you have nodejs preinstalled, make sure you are using version 10.2

3. If you have aliases preinstalles / same aliases used - you won’t be asked if you want to add them

Automated Setup Repository

Get the automated setup code from its .

Linux Start

  1. Run the script:

bash install.sh

MacOS Start

  1. Run the script:

bash install.sh

FAQ

Database migration failed: manual action required / magento: command not found

To solve that problem you need you to run the migration again:

docker ps | grep mysql
docker cp deploy/latest.sql <CONTAINER ID>:/tmp/dump.sql
docker-compose exec mysql bash
mysql -u root -pscandipwa -e "DROP DATABASE magento; CREATE DATABASE magento;"
mysql -u root -pscandipwa magento < /tmp/dump.sql

SSL certificates

If scandipwa.local website is not trusted by default, then please:

  1. Import the scandipwa-base/opt/cert/scandipwa-fullchain.pem

  2. Type thisisunsafe on the certificate error page

Please set COMPOSER_AUTH environment variable

Stop docker containers and restart the script.

502 bad gateway

Chrome and other browsers can cache page, just use hard reload or incognito mode. If doesn’t help restart some containers.

  • With aliases:

dc restart nginx ssl-term
dc restart varnish
  • Without aliases:

docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml restart nginx ssl-term
docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml restart varnish

Port {port} is used problem

If you don’t know what can use specific port, you can print it:

sudo lsof -i -P -n | grep -w "*:{port} (LISTEN)" 

Set up from beginning (install demo again)

Delete .env file in root of autoscandipwa folder:

rm -rf .env

Elasticsearch dead

dcf down
docker volume rm scandipwa-base_elasticsearch-data
dcf pull
dcf up -d

SSL container is dead

  • Check if scandipwa-base/opt/cert/ is not empty

  • Remove .env from autoscandipwa folder

  • Rerun the script and watch for SSL generation errors

Other useful information

Stop demo

  • With aliases

cd scandipwa-base && dcf down
  • Without aliases

cd scandipwa-base && docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml -f docker-compose.frontend.yml down 

Delete some of demo docker images (others should be deleted manually)

docker rmi scandipwa/base scandipwa/rendertron scandipwa/varnish

Delete all the demo docker images (including ALL other docker images)

docker system prune -a

Aliases added by script

  • Use dc to start without frontend container

alias dc="docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml"
  • Use dcf to start with frontend container

alias dcf="docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml -f docker-compose.frontend.yml"
  • Use inapp to quickly get inside of the app container

alias inapp="docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml -f docker-compose.frontend.yml exec -u user app"
  • Use infront to quickly get inside of the frontend container

alias infront="docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml -f docker-compose.frontend.yml exec -w /var/www/public/app/design/frontend/Scandiweb/pwa/ frontend"
  • Use applogs to quickly see the last 100 lines of app container logs

alias applogs="docker-compose logs -f --tail=100 app"
  • Use frontlogs to quickly see the last 100 lines of frontend container logs

alias frontlogs="docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml -f docker-compose.frontend.yml logs -f --tail=100 frontend"

Something does not work?

Follow this simple algorithm:

, run it and give special permissions manually

Refer to the . It most probably already has the solution to your problem.

If the issue still persists, , and feel free to ask questions in #pwa_tech public channel.

Alternatively - however, the response time there will be a little-bit longer than in community Slack.

public GitHub repository
Install docker
FAQ page
join our community slack
create an issue on GitHub