Please post here, as I cant get dev server to work.
Could you also please post your bud.config.js
Thanks for any help
Please post here, as I cant get dev server to work.
Could you also please post your bud.config.js
Thanks for any help
What have you tried? Are you running dev command inside the container? lando yarn dev
Here is a lando file from a project that uses the latest version of sage and bud but not the most recent version of bedrock:
name: example
recipe: wordpress
env_file:
- .env
proxy:
appserver_nginx:
- localhost
- example.lndo.site
dev:
- localhost:3000
config:
php: '8.1'
via: nginx
webroot: web
database: mariadb
xdebug: true
services:
dev:
type: node:18
services:
ports:
- 3000:3000
tooling:
yarn:
service: dev
@csorrentino HI, thanks for posting that. I’ll try it now.
Yes i’m trying to run lando yarn dev
so a command from inside container.
I tried your lando.yml file and still get Unable to connect when trying dev url after running lando yarn dev
Can you please post your bud.config.js ?
This works for me
lando.yml
:
name: example
recipe: wordpress
config:
database: mariadb
php: '8.1'
webroot: web
xdebug: true
proxy:
appserver:
- example.lndo.site
theme:
- localhost:3000
- localhost:3001
pma:
- pma.example.lndo.site
services:
theme:
type: node:16
overrides:
ports:
- 3000:3000
- 3001:3001
pma:
type: phpmyadmin
hosts:
- database
tooling:
yarn:
service: theme
excludes:
- vendor
- node_modules
bud.cofig.js
:
/**
* Proxy origin (`WP_HOME`)
* @see {@link https://bud.js.org/docs/bud.proxy/}
*/
.proxy('https://example.lndo.site')
/**
* Development origin
* @see {@link https://bud.js.org/docs/bud.serve/}
*/
// .serve('http://localhost:3000')
.serve('http://0.0.0.0:3000')
/**
* URI of the `public` directory
* @see {@link https://bud.js.org/docs/bud.setPublicPath/}
*/
.setPublicPath('/app/themes/sage/public/')
Note that in recent releases of Bud .serve('http://0.0.0.0:3000')
was replaced with:
.serve('http://localhost:3000')
I changed it back, because it doesn’t work for me on Lando
@cim thanks soo much it worked. Below is what i did.
lando.yml
name: example
recipe: wordpress
env_file:
- .env
config:
database: mariadb
php: '8.0'
via: nginx
composer_version: 2-latest
webroot: web
xdebug: true
proxy:
appserver_nginx:
- example.lndo.site
mailhog:
- mail.example.lndo.site
theme:
- localhost:3000
- localhost:3001
services:
mailhog:
type: mailhog
portforward: true
hogfrom:
- appserver_nginx
theme:
type: node:16
overrides:
ports:
- 3000:3000
- 3001:3001
tooling:
yarn:
service: theme
bud.cofig.js:
app
.proxy('https://example.lndo.site')
.serve('http://0.0.0.0:3000')
.watch(['resources/views', 'app']);
A bit late but this might also be helpful: GitHub - rkaalma/roots-lando-bedrock-sage-bud-example (follow the commits).
Thanks for sharing, its interesting you dont need the node ports overrides, are you using node locally or within container with lando yarn, or lando npm ?
I’m (temporarily) using it locally as there were some complications that I couldn’t overcome with Lando. I shall look into again when I have some spare time.
After getting node working within container, I decided to ditch it and go with node locally and use volta to lock or pin the node and yarn versions to package.json. Running node locally is quicker.