Step 5: Other configuration
-
Vite or Mix?
By default, the script uses Vite to build your javascript bundle (as has been the default since Laravel 9). If you are still using Laravel Mix, change the line
npm run build
tonpm run production
in thebitbucket-pipelines.yml
file. -
Vite/Mix environment variables
Laravel allows you to use variables from your
.env
file in your javascript bundle. These variables start withMIX_
orVITE_
. In your javascript code they look like this:process.env.MIX_PUSHER_APP_KEY
. If you use these types of variables, follow this post to configure them. -
Using SQLite?
When using SQLite, set the
DB_DATABASE
path to the root of your project, like this:project ├── .env ├── database.sqlite ├── current/ ├── releases/ └── storage/
-
Laravel Nova
If you application uses Laravel Nova, follow the instructions in this post.
You can't store the SQLite database file in the current
directory, because that directory is replaced on each deployment (meaning you'd lose your database on each deployment).