Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix config names #3229

Merged
merged 2 commits into from
Nov 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ REQUIRES_SUBSCRIPTION=false
CACHE_DRIVER=file
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync
QUEUE_CONNECTION=sync
BROADCAST_DRIVER=log

# Default filesystem to store uploaded files.
Expand Down
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ CHECK_VERSION=true
CACHE_DRIVER=database
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync
QUEUE_CONNECTION=sync

# Maximum allowed size for uploaded files, in kilobytes.
# Make sure this is an integer, without commas or spaces.
Expand Down
2 changes: 2 additions & 0 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@

'url' => env('APP_URL', 'http://localhost'),

'asset_url' => env('ASSET_URL', null),

/*
|--------------------------------------------------------------------------
| TIMEZONE
Expand Down
14 changes: 12 additions & 2 deletions config/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
| using this caching library. This connection is used when another is
| not explicitly specified when executing a given caching function.
|
| Supported: "apc", "array", "database", "file", "memcached", "redis"
| Supported: "apc", "array", "database", "file",
| "memcached", "redis", "dynamodb"
|
*/

Expand Down Expand Up @@ -72,7 +73,16 @@

'redis' => [
'driver' => 'redis',
'connection' => 'default',
'connection' => 'cache',
],

'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => env('DYNAMODB_ENDPOINT'),
],

],
Expand Down
2 changes: 1 addition & 1 deletion config/hashing.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/

'bcrypt' => [
'rounds' => 10,
'rounds' => env('BCRYPT_ROUNDS', 10),
],

/*
Expand Down
6 changes: 0 additions & 6 deletions config/laravel-owm.php

This file was deleted.

32 changes: 17 additions & 15 deletions config/queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@

/*
|--------------------------------------------------------------------------
| Default Queue Driver
| Default Queue Connection Name
|--------------------------------------------------------------------------
|
| The Laravel queue API supports a variety of back-ends via an unified
| Laravel's queue API supports an assortment of back-ends via a single
| API, giving you convenient access to each back-end using the same
| syntax for each one. Here you may set the default queue driver.
|
| Supported: "null", "sync", "database", "beanstalkd", "sqs", "redis"
| syntax for every one. Here you may define a default connection.
|
*/

'default' => env('QUEUE_DRIVER', 'sync'),
'default' => env('QUEUE_CONNECTION', env('QUEUE_DRIVER', 'sync')),

/*
|--------------------------------------------------------------------------
Expand All @@ -26,6 +24,8 @@
| is used by your application. A default configuration has been added
| for each back-end shipped with Laravel. You are free to add more.
|
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
*/

'connections' => [
Expand All @@ -38,30 +38,32 @@
'driver' => 'database',
'table' => 'jobs',
'queue' => 'default',
'retry_after' => 60,
'retry_after' => 90,
],

'beanstalkd' => [
'driver' => 'beanstalkd',
'host' => 'localhost',
'queue' => 'default',
'ttr' => 60,
'retry_after' => 90,
'block_for' => 0,
],

'sqs' => [
'driver' => 'sqs',
'key' => 'your-public-key',
'secret' => 'your-secret-key',
'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
'queue' => 'your-queue-name',
'region' => 'us-east-1',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => env('SQS_QUEUE', 'your-queue-name'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],

'redis' => [
'driver' => 'redis',
'connection' => 'default',
'queue' => 'default',
'retry_after' => 60,
'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => 90,
'block_for' => null,
],

],
Expand Down
10 changes: 7 additions & 3 deletions config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
],

'postmark' => [
'token' => env('POSTMARK_TOKEN'),
],

'ses' => [
'key' => env('SES_KEY'),
'secret' => env('SES_SECRET'),
'region' => 'us-east-1',
'key' => env('AWS_ACCESS_KEY_ID', env('SES_KEY')),
'secret' => env('AWS_SECRET_ACCESS_KEY', env('SES_SECRET')),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],

'stripe' => [
Expand Down
21 changes: 18 additions & 3 deletions config/session.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
|
*/

'cookie' => 'laravel_session',
'cookie' => env('SESSION_COOKIE', 'laravel_session'),

/*
|--------------------------------------------------------------------------
Expand All @@ -148,7 +148,7 @@
|
*/

'domain' => null,
'domain' => env('SESSION_DOMAIN', null),

/*
|--------------------------------------------------------------------------
Expand All @@ -161,7 +161,7 @@
|
*/

'secure' => false,
'secure' => env('SESSION_SECURE_COOKIE', false),

/*
|--------------------------------------------------------------------------
Expand All @@ -176,4 +176,19 @@

'http_only' => true,

/*
|--------------------------------------------------------------------------
| Same-Site Cookies
|--------------------------------------------------------------------------
|
| This option determines how your cookies behave when cross-site requests
| take place, and can be used to mitigate CSRF attacks. By default, we
| do not enable this as other CSRF protection services are in place.
|
| Supported: "lax", "strict"
|
*/

'same_site' => null,

];
7 changes: 5 additions & 2 deletions config/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/

'paths' => [
realpath(base_path('resources/views')),
resource_path('views'),
],

/*
Expand All @@ -28,6 +28,9 @@
|
*/

'compiled' => realpath(storage_path('framework/views')),
'compiled' => env(
'VIEW_COMPILED_PATH',
realpath(storage_path('framework/views'))
),

];
4 changes: 2 additions & 2 deletions docs/installation/generic.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Monica can work with a queue mechanism to handle different events, so we don't b

We recommend that you do not use a queue mechanism as it complexifies the overall system and can make debugging harder when things go wrong.

This is why we suggest to use `QUEUE_DRIVER=sync` in your .env file. This will bypass the queues entirely and will process requests as they come. In practice, unless you have thousands of users, you don't need to use an asynchronous queue.
This is why we suggest to use `QUEUE_CONNECTION=sync` in your .env file. This will bypass the queues entirely and will process requests as they come. In practice, unless you have thousands of users, you don't need to use an asynchronous queue.

That being said, if you still want to make your life more complicated, here is what you can do.

Expand All @@ -184,7 +184,7 @@ There are several choices for the queue mechanism:
* Beanstalk
* Amazon SQS

The simplest queue is the database driver. To set it up, simply change in your `.env` file the following `QUEUE_DRIVER=sync` by `QUEUE_DRIVER=database`.
The simplest queue is the database driver. To set it up, simply change in your `.env` file the following `QUEUE_CONNECTION=sync` by `QUEUE_CONNECTION=database`.

To configure the other queues, refer to the [official Laravel documentation](https://laravel.com/docs/master/queues#driver-prerequisites) on the topic.

Expand Down
2 changes: 1 addition & 1 deletion docs/installation/heroku.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ After deployment, the configuration of your app should look like this:

![Picture Of Configuration](https://user-images.githubusercontent.com/25419741/45253146-9f904800-b362-11e8-916b-8980fc2a83d8.png)

Note that when you deploy with the "Deploy to Heroku" purple button, only 1 dyno ("web") is activated while the "queue" one is not. That is OK - the "queue" dyno is only helpful if you set `QUEUE_DRIVER=database` (default is 'sync').
Note that when you deploy with the "Deploy to Heroku" purple button, only 1 dyno ("web") is activated while the "queue" one is not. That is OK - the "queue" dyno is only helpful if you set `QUEUE_CONNECTION=database` (default is 'sync').


### Optional: Setup the access tokens to use the API
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<server name="DB_CONNECTION" value="testing"/>
<server name="CACHE_DRIVER" value="array"/>
<server name="SESSION_DRIVER" value="array"/>
<server name="QUEUE_DRIVER" value="sync"/>
<server name="QUEUE_CONNECTION" value="sync"/>
<server name="APP_DEFAULT_LOCALE" value="en"/>
<server name="LOG_CHANNEL" value="testing"/>
<server name="DAV_ENABLED" value="true"/>
Expand Down
2 changes: 1 addition & 1 deletion phpunitpostgres.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<env name="DB_CONNECTION" value="pgsqltesting"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="APP_DEFAULT_LOCALE" value="en"/>
</php>
<logging>
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/.env.jenkins.mysql
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ DB_TEST_PASSWORD=

CACHE_DRIVER=array
SESSION_DRIVER=file
QUEUE_DRIVER=sync
QUEUE_CONNECTION=sync

MFA_ENABLED=true
2 changes: 1 addition & 1 deletion scripts/ci/.env.mysql
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ DB_TEST_PASSWORD=

CACHE_DRIVER=array
SESSION_DRIVER=file
QUEUE_DRIVER=sync
QUEUE_CONNECTION=sync
LOG_CHANNEL=testing
BROADCAST_DRIVER=log

Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/.env.postgres
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ DB_TEST_PASSWORD=

CACHE_DRIVER=array
SESSION_DRIVER=file
QUEUE_DRIVER=sync
QUEUE_CONNECTION=sync
LOG_CHANNEL=testing

MFA_ENABLED=true
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/.examples/nginx-proxy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# To use redis:
#- REDIS_HOST=redis
#- CACHE_DRIVER=redis
#- QUEUE_DRIVER=redis
#- QUEUE_CONNECTION=redis
#

version: "3.4"
Expand Down
4 changes: 2 additions & 2 deletions scripts/docker/.examples/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The [`supervisor`](supervisor) examples shows you how to run monica with
- a db container (mysql:5.7)
- an app container, which run `supervisord` to handle a web server/fpm, a cron, and a queue.

This let you use `QUEUE_DRIVER=database` in your `.env` file.
This let you use `QUEUE_CONNECTION=database` in your `.env` file.


### With nginx proxy and a self-signed certificate
Expand All @@ -62,4 +62,4 @@ You may want to set `APP_ENV=production` to force the use of `https` mode.
This example add a `redis` container, that can be used too, adding these variables to your `.env` file:
- `REDIS_HOST=redis`: mandatory
- `CACHE_DRIVER=redis`: to use redis as a cache table
- `QUEUE_DRIVER=redis`: to use redis as a queue table
- `QUEUE_CONNECTION=redis`: to use redis as a queue table