aligajani
4 months ago
580
1
Vapor

How do I use MYSQL_ATTR_SSL_CA in Vapor when .pem file is in storage?

Posted 4 months ago by aligajani

It always get deleted when deployed to Vapor as the storage folder is purged.

'options' => extension_loaded('pdo_mysql') ? array_filter([
                PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA')
                    ? storage_path() . '/ssl/' . env('MYSQL_ATTR_SSL_CA')
                    : null,
            ]) : [],

I don't want to directly reference it to an s3/cdn asset URL as that will be too slow.

Any tips? PS: It works on local just fine, just not on Vapor.

Please sign in or create an account to participate in this conversation.