User Guide
Requirements
- GitHub, GitLab, or Bitbucket account
- Vercel account
- PlanetScale account (optional)
Both Vercel & PlanetScale accounts can be connected via single sign-on (SSO)
Deploy to Vercel
Vercel Setup
After first deploy, navigate to Settings → Environment Variables and set the following variables.
Name: CI_ENVIRONMENT Value: production Name: app_baseURL Value: your-custom.vercel.app
If using PlanetScale or other MySQL DB, set your custom connection credentials.
Name: DB_HOST Value: us-east.connect.psdb.cloud Name: DB_NAME Value: db-name Name: DB_USER Value: username Name: DB_PASS Value: password
‣ Environment Variables in Vercel's Docs
PlanetScale Setup
- Create new database
- Take special care to copy the generated password, as it is only shown once.
- Navigate to database → Branches → main → console
- Import sample schema/data from: public/resources/demo.sql (optional for demo page)
‣ PlanetScale's quickstart guide
CodeIgnter Setup
Copy sample env file.
cp env .env
Setup database connectivity for your development environment, set the following variables in the .env file.
CI_ENVIRONMENT = development # DB SETTINGS database.default.hostname = us-east.connect.psdb.cloud database.default.database = db-name database.default.username = username database.default.password = password
Start the PHP development Server.
php spark start
‣ PHP Version 7.4.13 by Vercel Community PHP.
‣ View PHP Info
‣ See CodeIgniter's PHP requirements.
‣ Handling Multiple Environments in the CodeIgniter User Guide