Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/CleverCloud/laravel-postgresql-example

Run Laravel with PostgreSQL on Clever Cloud
https://github.com/CleverCloud/laravel-postgresql-example

clevercloud-example laravel postgresql

Last synced: 2 months ago
JSON representation

Run Laravel with PostgreSQL on Clever Cloud

Awesome Lists containing this project

README

        

# Laravel as Clever Cloud demo

This sample project is a fork from [GitHub](https://github.com/evercode1/sample-project).

## Configuration

To use a database (like PostgreSQL), you can link your application with an addon or manually set the following environment variables will be set.

```bash
POSTGRESQL_ADDON_HOST
POSTGRESQL_ADDON_PORT
POSTGRESQL_ADDON_DB
POSTGRESQL_ADDON_USER
POSTGRESQL_ADDON_PASSWORD
```

To update your database schema, add this environment variable to your Clever Cloud application:

```bash
CC_POST_BUILD_HOOK=php artisan migrate --force
```

To enable logs retrieving on Clever console or Clever CLI, ensure that you have the following value in `./config/app.php`:

```php
'log' => env('APP_LOG'),
```

Then you can create a Clever application environment variable as following: `APP_LOG=syslog`.

Finally, you have to manually set the `APP_KEY=base64:X` with `X` the result of `php artisan key:generate` on your local project.