Skip to content

Commit ed3dd3e

Browse files
committed
docs: update README for database configuration instructions and sensitive information handling
1 parent e79158e commit ed3dd3e

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,20 @@ Specifically, you need to do the following:
4848
- Create the [database credentials](https://docs.couchbase.com/cloud/clusters/manage-database-users.html) to access the travel-sample bucket (Read and Write) used in the application.
4949
- [Allow access](https://docs.couchbase.com/cloud/clusters/allow-ip-address.html) to the Cluster from the IP on which the application is running.
5050

51-
All configuration for communication with the database is read from the environment variables. We have provided a convenience feature in this quickstart to read the environment variables from a local file, `config/couchbase.php` in the source folder.
51+
All configuration for communication with the database is read from the environment variables. We have provided a convenience feature in this quickstart to read the environment variables from a local file, `config/couchbase.php`.
5252

53-
Create a copy of `config/couchbase.php.example` in the `app` folder & rename it to `config/couchbase.php`& add the values for the Couchbase connection.
53+
Set the values for the Couchbase connection in the `config/couchbase.php` file. This file is used to store sensitive information and should not be checked into version control.
5454

5555
> Note: Files starting with `.` could be hidden in the file manager in your Unix based systems including GNU/Linux and Mac OS.
5656
57-
```sh
58-
DB_CONN_STR=<connection_string>
59-
DB_USERNAME=<user_with_read_write_permission_to_travel-sample_bucket>
60-
DB_PASSWORD=<password_for_user>
57+
```php
58+
<?php
59+
return [
60+
'host' => env('DB_CONN_STR', 'couchbase://127.0.0.1'),
61+
'username' => env('DB_USERNAME', 'Administrator'),
62+
'password' => env('DB_PASSWORD', 'password'),
63+
'bucket' => env('DB_BUCKET', 'travel-sample'),
64+
];
6165
```
6266

6367
> Note: The connection string expects the `couchbases://` or `couchbase://` part.

0 commit comments

Comments
 (0)