Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

trevorpan's avatar

envoyer has deployed forge has not (roles / permissions tables & AuthServiceProvider)

I know this sounds super basic but I'm trying to figure out how these services work together. I've watched both series on forge and envoyer - they've really helped alot.

Wish there was a bridge video series that shows how to use them both. Envoyer is now at all green lights which is great (just fantastic).

Do we have to install the git repository on Forge? Or is it Envoyer that pushes this? (this is where the lines of which service does what is not clear to me)

I've run into this issue when trying to install the repo on Forge:

  SQLSTATE[HY000] [1045] Access denied for user 'forge'@'localhost' (using password: NO) (SQL: select * from information_schema.tables where table_schema = forge and table_name = permissions and table_type = 'BASE TABLE')

What's strange is the .env in Envoyer should deploy the variables. The server status shows green and when refreshed stays that way. This seems like all public keys, etc are in good working condition...

In order to get this to work in CI I used these scripts:

mysql $DB_DATABASE < database/insert_roles.sql
mysql $DB_DATABASE < database/insert_permissions.sql
mysql $DB_DATABASE < database/insert_permission_role.sql
mysql $DB_DATABASE < database/insert_role_user.sql

Should these be a recipe on Forge or a Deployment Hook on Envoyer?

Or is there some other reason the code deployed from Envoyer has not made it to the server?

Thank you `

0 likes
1 reply
trevorpan's avatar
trevorpan
OP
Best Answer
Level 15

So, this was a bit tough for a first-timer.

In order to get the roles/permissions tables in so the AuthServiceProvider wouldn't throw errors I ssh'd into the server and then booted up mysql and manually installed the tables with a insert statement. That took care of the roles/permissions issues. (probably a cleaner way, but this worked)

But I found I had to refresh the server in envoyer a few times, and be sure to update env variables with server address. In the end it wasn't too bad, but the first time through it was rough.

The other issue was paths - making sure current/public is the forge path (what envoyer deploys too). There were a few hangups. Hope that helps.

Please or to participate in this conversation.