Sage 9 Beta 4 w Trellis/Bedrock production deployment not set to production mode

Hey everyone, I’ve this weird problem after successfully provisioning a production server with sudo ansible-playbook server.yml -e env=production and deploying with sudo ./bin/ production the site still tries to load CSS and JS using main.js and main.css while the actual files in the dist folder are cachebustered and look more like main_32d0311f.js and main_32d0311f.css.

What could be going wrong?


Why are you running everything with sudo ?

I guess because of the way I’d installed Ansible, I’d get permission errors w/o sudo:

Unable to create local directories(/Users/krishaamer/.ansible/cp): [Errno 13] Permission denied: '/Users/krishaamer/.ansible/cp' fatal:

However, I don’t think this would have any influence on how things are run on the server? The deploys worked fine for months, the trouble started after upgrading to Sage 9 beta 4.

No idea at all, since we can’t see your deploy-hooks/build-before.yml file :slight_smile:

1 Like

Thanks Ben, that small comment actually set me in the right direction. I didn’t realize build-before.yml had to do anything - it was commented out as by default. I assumed this was taken care of on the server.

So the fix was:

  1. uncomment build-before.yml

  2. change "soberwp/controller": "dev-trunk" to "soberwp/controller": "~9.0.0-beta.4" in theme composer.json. dev-trunk was (dated as of yesterday) causing an error finding the controller files.