diff --git a/configs/core/.env b/configs/core/.env index 27e9ccd..858566b 100644 --- a/configs/core/.env +++ b/configs/core/.env @@ -10,7 +10,7 @@ BASIC_AUTH_TOKEN= AUTH_DRIVER=basic_token CHAIN=substrate -NETWORK=enjin +NETWORK=enjin-matrixchain DECODER_CONTAINER=decoder:8090 DAEMON_ACCOUNT= diff --git a/configs/core/composer.json b/configs/core/composer.json index 8e25ccb..994b377 100644 --- a/configs/core/composer.json +++ b/configs/core/composer.json @@ -22,18 +22,17 @@ "require": { "php": "^8.1|^8.2", "beyondcode/laravel-websockets": "^1.0", - "enjin/platform-core": "*", - "enjin/platform-beam": "*", - "enjin/platform-fuel-tanks": "*", - "enjin/platform-marketplace": "*", - "enjin/platform-ui": "*", + "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", "guzzlehttp/guzzle": "^7.0", "laravel/framework": "^10.0", "laravel/horizon": "^5.0", "laravel/sanctum": "^3.0", "laravel/tinker": "^2.0", - "pusher/pusher-php-server": "^7.0", - "opcodesio/log-viewer": "^3.0" + "pusher/pusher-php-server": "^7.0" }, "require-dev": { "roave/security-advisories": "dev-latest", diff --git a/configs/core/config/log-viewer.php b/configs/core/config/log-viewer.php deleted file mode 100644 index 35fd2e7..0000000 --- a/configs/core/config/log-viewer.php +++ /dev/null @@ -1,212 +0,0 @@ - env('LOG_VIEWER_ENABLED', true), - - /* - |-------------------------------------------------------------------------- - | Log Viewer Domain - |-------------------------------------------------------------------------- - | You may change the domain where Log Viewer should be active. - | If the domain is empty, all domains will be valid. - | - */ - - 'route_domain' => null, - - /* - |-------------------------------------------------------------------------- - | Log Viewer Route - |-------------------------------------------------------------------------- - | Log Viewer will be available under this URL. - | - */ - - 'route_path' => 'log-viewer', - - /* - |-------------------------------------------------------------------------- - | Back to system URL - |-------------------------------------------------------------------------- - | When set, displays a link to easily get back to this URL. - | Set to `null` to hide this link. - | - | Optional label to display for the above URL. - | - */ - - 'back_to_system_url' => config('app.url', null), - - 'back_to_system_label' => null, // Displayed by default: "Back to {{ app.name }}" - - /* - |-------------------------------------------------------------------------- - | Log Viewer time zone. - |-------------------------------------------------------------------------- - | The time zone in which to display the times in the UI. Defaults to - | the application's timezone defined in config/app.php. - | - */ - - 'timezone' => null, - - /* - |-------------------------------------------------------------------------- - | Log Viewer route middleware. - |-------------------------------------------------------------------------- - | Optional middleware to use when loading the initial Log Viewer page. - | - */ - - 'middleware' => [ - 'web', - \Opcodes\LogViewer\Http\Middleware\AuthorizeLogViewer::class, - ], - - /* - |-------------------------------------------------------------------------- - | Log Viewer API middleware. - |-------------------------------------------------------------------------- - | Optional middleware to use on every API request. The same API is also - | used from within the Log Viewer user interface. - | - */ - - 'api_middleware' => [ - \Opcodes\LogViewer\Http\Middleware\EnsureFrontendRequestsAreStateful::class, - \Opcodes\LogViewer\Http\Middleware\AuthorizeLogViewer::class, - ], - - /* - |-------------------------------------------------------------------------- - | Log Viewer Remote hosts. - |-------------------------------------------------------------------------- - | Log Viewer supports viewing Laravel logs from remote hosts. They must - | be running Log Viewer as well. Below you can define the hosts you - | would like to show in this Log Viewer instance. - | - */ - - 'hosts' => [ - 'local' => [ - 'name' => ucfirst(env('APP_ENV', 'local')), - ], - - // 'staging' => [ - // 'name' => 'Staging', - // 'host' => 'https://staging.example.com/log-viewer', - // 'auth' => [ // Example of HTTP Basic auth - // 'username' => 'username', - // 'password' => 'password', - // ], - // ], - // - // 'production' => [ - // 'name' => 'Production', - // 'host' => 'https://example.com/log-viewer', - // 'auth' => [ // Example of Bearer token auth - // 'token' => env('LOG_VIEWER_PRODUCTION_TOKEN'), - // ], - // 'headers' => [ - // 'X-Foo' => 'Bar', - // ], - // ], - ], - - /* - |-------------------------------------------------------------------------- - | Include file patterns - |-------------------------------------------------------------------------- - | - */ - - 'include_files' => [ - '*.log', - '**/*.log', - - // You can include paths to other log types as well, such as apache, nginx, and more. - '/var/log/httpd/*', - '/var/log/nginx/*', - - // MacOS Apple Silicon logs - '/opt/homebrew/var/log/nginx/*', - '/opt/homebrew/var/log/httpd/*', - '/opt/homebrew/var/log/php-fpm.log', - '/opt/homebrew/var/log/postgres*log', - '/opt/homebrew/var/log/redis*log', - '/opt/homebrew/var/log/supervisor*log', - - // '/absolute/paths/supported', - ], - - /* - |-------------------------------------------------------------------------- - | Exclude file patterns. - |-------------------------------------------------------------------------- - | This will take precedence over included files. - | - */ - - 'exclude_files' => [ - // 'my_secret.log' - ], - - /* - |-------------------------------------------------------------------------- - | Hide unknown files. - |-------------------------------------------------------------------------- - | The include/exclude options above might catch files which are not - | logs supported by Log Viewer. In that case, you can hide them - | from the UI and API calls by setting this to true. - | - */ - - 'hide_unknown_files' => true, - - /* - |-------------------------------------------------------------------------- - | Shorter stack trace filters. - |-------------------------------------------------------------------------- - | Lines containing any of these strings will be excluded from the full log. - | This setting is only active when the function is enabled via the user interface. - | - */ - - 'shorter_stack_trace_excludes' => [ - '/vendor/symfony/', - '/vendor/laravel/framework/', - '/vendor/barryvdh/laravel-debugbar/', - ], - - /* - |-------------------------------------------------------------------------- - | Cache driver - |-------------------------------------------------------------------------- - | Cache driver to use for storing the log indices. Indices are used to speed up - | log navigation. Defaults to your application's default cache driver. - | - */ - - 'cache_driver' => env('LOG_VIEWER_CACHE_DRIVER', null), - - /* - |-------------------------------------------------------------------------- - | Chunk size when scanning log files lazily - |-------------------------------------------------------------------------- - | The size in MB of files to scan before updating the progress bar when searching across all files. - | - */ - - 'lazy_scan_chunk_size_in_mb' => 50, - - 'strip_extracted_context' => true, -]; diff --git a/configs/core/start.sh b/configs/core/start.sh index 828be25..2463166 100755 --- a/configs/core/start.sh +++ b/configs/core/start.sh @@ -13,6 +13,9 @@ elif [ "$role" = "app" ]; then php artisan log-viewer:publish && php artisan platform-ui:install --route="/" --tenant="no" --skip && php artisan route:cache && php artisan view:cache echo "Running apache..." exec apache2-foreground +elif [ "$role" = "relay" ]; then + echo "Running relay watcher..." + php artisan platform:relay-watcher elif [ "$role" = "websocket" ]; then echo "Running queue and websocket..." supervisord && supervisorctl start horizon diff --git a/configs/daemon/config.json b/configs/daemon/config.json index e8e3045..547c398 100644 --- a/configs/daemon/config.json +++ b/configs/daemon/config.json @@ -1,5 +1,6 @@ { "node": "wss://rpc.matrix.blockchain.enjin.io:443", + "relay_node": "wss://rpc.relay.blockchain.enjin.io:443", "api": "http://app:80/graphql", "master_key": "/opt/app/storage" } diff --git a/docker-compose.yml b/docker-compose.yml index 518048c..f1146a4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,8 +41,6 @@ services: restart: unless-stopped environment: CONTAINER_ROLE: app - volumes: - - ./logs:/var/www/html/storage/logs depends_on: - database - redis @@ -59,8 +57,6 @@ services: restart: unless-stopped environment: CONTAINER_ROLE: websocket - volumes: - - ./logs:/var/www/html/storage/logs depends_on: - database - redis @@ -77,16 +73,25 @@ services: restart: unless-stopped environment: CONTAINER_ROLE: ingest - volumes: - - ./logs:/var/www/html/storage/logs depends_on: - - database - - redis - - app + - decoder - websocket extra_hosts: - "host.docker.internal:host-gateway" + relay: + image: enjin/platform:latest + build: + context: . + dockerfile: configs/core/Dockerfile + restart: unless-stopped + environment: + CONTAINER_ROLE: relay + depends_on: + - ingest + extra_hosts: + - "host.docker.internal:host-gateway" + beam: image: enjin/platform:latest build: @@ -95,13 +100,7 @@ services: restart: unless-stopped environment: CONTAINER_ROLE: beam - volumes: - - ./logs:/var/www/html/storage/logs depends_on: - - database - - redis - - app - - websocket - ingest extra_hosts: - "host.docker.internal:host-gateway"