Roots Discourse

Default Sage installation renders index.php instead of blade templates

I just created a fresh sage installation on a local wordpress environment, but when I activate the theme and visit my site, it shows a completely blank page (no wp tool bar).

These are the exact steps I took:

  1. mkdir sage-site && cd sage-site
  2. docker-compose up -d (see docker-compose file below)
  3. visit localhost:8000 and go through the wordpress installation
  4. cd wp-content/themes
  5. composer create-project roots/sage sage (then go through the install options like theme name etc)
  6. Visit localhost:8000/wp-admin and activate the sage theme
  7. Visit localhost:8000 (see a blank page)

What I tried:

  1. Going to wordpress settings and setting front page to static page (the sample page)
  2. I tried editing the index.php file in the /resources folder and it seems this is what is being displayed. I added an echo in there and sure enough I see it when I visit localhost:8000
  3. Doing yarn build, yarn build:production and composer install
  4. Starting the whole process from scratch, but using npm instead of yarn
  5. Setting "devUrl": "http://localhost:8000", inside the resources/assets/config.json file (see full config below)

/resources/assets/config.json:

{
  "entry": {
    "main": [
      "./scripts/main.js",
      "./styles/main.scss"
    ],
    "customizer": [
      "./scripts/customizer.js"
    ]
  },
  "publicPath": "/wp-content/themes/sage",
  "devUrl": "http://localhost:8000",
  "proxyUrl": "http://localhost:8000",
  "cacheBusting": "[name]_[hash:8]",
  "watch": [
    "app/**/*.php",
    "config/**/*.php",
    "resources/views/**/*.php"
  ]
}

docker-compose.yaml:

version: '3'

services:
  # Database
  db:
image: mysql:5.7
volumes:
  - db_data:/var/lib/mysql
restart: always
environment:
  MYSQL_ROOT_PASSWORD: password
  MYSQL_DATABASE: wordpress
  MYSQL_USER: wordpress
  MYSQL_PASSWORD: wordpress
networks:
  - wpsite
  # phpmyadmin
  phpmyadmin:
depends_on:
  - db
image: phpmyadmin/phpmyadmin
restart: always
ports:
  - '8080:80'
environment:
  PMA_HOST: db
  MYSQL_ROOT_PASSWORD: password 
networks:
  - wpsite
  # Wordpress
  wordpress:
depends_on:
  - db
image: wordpress:latest
ports:
  - '8000:80'
restart: always
volumes: ['./:/var/www/html']
environment:
  WORDPRESS_DB_HOST: db:3306
  WORDPRESS_DB_USER: wordpress
  WORDPRESS_DB_PASSWORD: wordpress
networks:
  - wpsite
networks:
  wpsite:
volumes:
  db_data: