Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardocustodio committed Jul 16, 2024
1 parent 8f60282 commit 0d33943
Show file tree
Hide file tree
Showing 11 changed files with 487 additions and 39 deletions.
51 changes: 37 additions & 14 deletions configs/core/.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,26 @@ APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_TIMEZONE=UTC
APP_URL=
CORS_PATHS="graphql,graphql/beam,graphql/fuel-tanks,graphql/marketplace"
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US
APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database
ASSET_URL="${APP_URL}"

BASIC_AUTH_TOKEN=
AUTH_DRIVER=basic_token
BCRYPT_ROUNDS=12
CORS_PATHS="graphql,graphql/beam,graphql/fuel-tanks,graphql/marketplace"

SYNC_ALL=true
CHAIN=substrate
NETWORK=enjin-matrixchain
ENJIN_PLATFORM_API_THROTTLE=false
NETWORK=canary-matrixchain
DECODER_CONTAINER=decoder:8090
DAEMON_ACCOUNT=
SYNC_ALL=true

BASIC_AUTH_TOKEN=
AUTH_DRIVER=basic_token

DB_CONNECTION=mysql
DB_HOST=database
Expand All @@ -23,40 +31,55 @@ DB_USERNAME=root
DB_PASSWORD=password

BROADCAST_DRIVER=pusher
PUSHER_HOST=127.0.0.1
PUSHER_HOST=0.0.0.0
PUSHER_PORT=6001
PUSHER_SCHEME=http
PUSHER_APP_ID=platform
PUSHER_APP_KEY=websocket
PUSHER_APP_SECRET=platform
PUSHER_APP_CLUSTER=mt1

REVERB_SERVER_HOST=${PUSHER_HOST}
REVERB_SERVER_PORT="${PUSHER_PORT}"
REVERB_APP_ID="${PUSHER_APP_ID}"
REVERB_APP_KEY="${PUSHER_APP_KEY}"
REVERB_APP_SECRET="${PUSHER_APP_SECRET}"

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

CACHE_DRIVER=redis
QUEUE_CONNECTION=redis
FILESYSTEM_DISK=local
SESSION_DRIVER=file
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null

BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=redis

CACHE_STORE=redis
CACHE_PREFIX=

MEMCACHED_HOST=memcached

REDIS_CLIENT=phpredis
REDIS_HOST=redis
REDIS_PASSWORD=null
REDIS_PORT=6379

LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_MAILER=log
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
Expand Down
2 changes: 1 addition & 1 deletion configs/core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN apt-get update -y && \

# Install imagick and redis
RUN apt-get install -y libmagickwand-dev --no-install-recommends && \
pecl install imagick redis
pecl install imagick redis uv

# Install node and npm
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - &&\
Expand Down
26 changes: 13 additions & 13 deletions configs/core/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,25 @@
}
],
"require": {
"php": "^8.1|^8.2",
"beyondcode/laravel-websockets": "^1.0",
"enjin/platform-core": "^1.0",
"enjin/platform-beam": "^1.0",
"enjin/platform-fuel-tanks": "^1.0",
"enjin/platform-marketplace": "^1.0",
"enjin/platform-ui": "^1.0",
"php": "^8.2|^8.3",
"enjin/platform-core": "^1.9",
"enjin/platform-beam": "^1.9",
"enjin/platform-fuel-tanks": "^1.9",
"enjin/platform-marketplace": "^1.9",
"enjin/platform-ui": "^1.9",
"guzzlehttp/guzzle": "^7.0",
"laravel/framework": "^10.0",
"laravel/framework": "^11.0",
"laravel/horizon": "^5.0",
"laravel/sanctum": "^3.0",
"laravel/reverb": "@beta",
"laravel/sanctum": "^4.0",
"laravel/tinker": "^2.0",
"pusher/pusher-php-server": "^7.0"
"fakerphp/faker": "^1.0"
},
"require-dev": {
"roave/security-advisories": "dev-latest",
"fakerphp/faker": "^1.0",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^7.0",
"phpunit/phpunit": "^10.0",
"nunomaduro/collision": "^8.0",
"phpunit/phpunit": "^11.0",
"spatie/laravel-ignition": "^2.0"
},
"autoload": {
Expand All @@ -55,6 +54,7 @@
}
},
"scripts": {
"build-sr25519": "cd vendor/gmajor/sr25519-bindings/go && go build -buildmode=c-shared -o sr25519.so . && mv sr25519.so ../src/Crypto/sr25519.so",
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
Expand Down
107 changes: 107 additions & 0 deletions configs/core/config/cache.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<?php

use Illuminate\Support\Str;

return [

/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache store that will be used by the
| framework. This connection is utilized if another isn't explicitly
| specified when running a cache operation inside the application.
|
*/

'default' => env('CACHE_STORE', 'file'),

/*
|--------------------------------------------------------------------------
| Cache Stores
|--------------------------------------------------------------------------
|
| Here you may define all of the cache "stores" for your application as
| well as their drivers. You may even define multiple stores for the
| same cache driver to group types of items stored in your caches.
|
| Supported drivers: "array", "database", "file", "memcached",
| "redis", "dynamodb", "octane", "null"
|
*/

'stores' => [

'array' => [
'driver' => 'array',
'serialize' => false,
],

'database' => [
'driver' => 'database',
'table' => env('DB_CACHE_TABLE', 'cache'),
'connection' => env('DB_CACHE_CONNECTION'),
'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'),
],

'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
'lock_path' => storage_path('framework/cache/data'),
],

'memcached' => [
'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
],

'redis' => [
'driver' => 'redis',
'connection' => env('REDIS_CACHE_CONNECTION', 'cache'),
'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'),
],

'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'),
],

'octane' => [
'driver' => 'octane',
],

],

/*
|--------------------------------------------------------------------------
| Cache Key Prefix
|--------------------------------------------------------------------------
|
| When utilizing the APC, database, memcached, Redis, and DynamoDB cache
| stores, there might be other applications using the same cache. For
| that reason, you may prefix every cache key to avoid collisions.
|
*/

'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache_'),

];
91 changes: 91 additions & 0 deletions configs/core/config/reverb.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Default Reverb Server
|--------------------------------------------------------------------------
|
| This option controls the default server used by Reverb to handle
| incoming messages as well as broadcasting message to all your
| connected clients. At this time only "reverb" is supported.
|
*/

'default' => env('REVERB_SERVER', 'reverb'),

/*
|--------------------------------------------------------------------------
| Reverb Servers
|--------------------------------------------------------------------------
|
| Here you may define details for each of the supported Reverb servers.
| Each server has its own configuration options that are defined in
| the array below. You should ensure all the options are present.
|
*/

'servers' => [

'reverb' => [
'host' => env('REVERB_SERVER_HOST', '0.0.0.0'),
'port' => env('REVERB_SERVER_PORT', 8080),
'hostname' => env('REVERB_HOST'),
'options' => [
'tls' => [],
],
'max_request_size' => env('REVERB_MAX_REQUEST_SIZE', 10_000),
'scaling' => [
'enabled' => env('REVERB_SCALING_ENABLED', false),
'channel' => env('REVERB_SCALING_CHANNEL', 'reverb'),
'server' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'port' => env('REDIS_PORT', '6379'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'database' => env('REDIS_DB', '0'),
],
],
'pulse_ingest_interval' => env('REVERB_PULSE_INGEST_INTERVAL', 15),
'telescope_ingest_interval' => env('REVERB_TELESCOPE_INGEST_INTERVAL', 15),
],

],

/*
|--------------------------------------------------------------------------
| Reverb Applications
|--------------------------------------------------------------------------
|
| Here you may define how Reverb applications are managed. If you choose
| to use the "config" provider, you may define an array of apps which
| your server will support, including their connection credentials.
|
*/

'apps' => [

'provider' => 'config',

'apps' => [
[
'key' => env('REVERB_APP_KEY'),
'secret' => env('REVERB_APP_SECRET'),
'app_id' => env('REVERB_APP_ID'),
'options' => [
'host' => env('REVERB_HOST'),
'port' => env('REVERB_PORT', 443),
'scheme' => env('REVERB_SCHEME', 'https'),
'useTLS' => env('REVERB_SCHEME', 'https') === 'https',
],
'allowed_origins' => ['*'],
'ping_interval' => env('REVERB_APP_PING_INTERVAL', 60),
'max_message_size' => env('REVERB_APP_MAX_MESSAGE_SIZE', 10_000),
],
],

],

];
Loading

0 comments on commit 0d33943

Please sign in to comment.