Skip to content

Commit

Permalink
[PLA-1765] Adds relay-watcher to docker (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardocustodio authored May 15, 2024
1 parent 379df43 commit 1635e1e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 235 deletions.
2 changes: 1 addition & 1 deletion configs/core/.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ BASIC_AUTH_TOKEN=
AUTH_DRIVER=basic_token

CHAIN=substrate
NETWORK=enjin
NETWORK=enjin-matrixchain
DECODER_CONTAINER=decoder:8090
DAEMON_ACCOUNT=

Expand Down
13 changes: 6 additions & 7 deletions configs/core/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
212 changes: 0 additions & 212 deletions configs/core/config/log-viewer.php

This file was deleted.

3 changes: 3 additions & 0 deletions configs/core/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions configs/daemon/config.json
Original file line number Diff line number Diff line change
@@ -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"
}
29 changes: 14 additions & 15 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ services:
restart: unless-stopped
environment:
CONTAINER_ROLE: app
volumes:
- ./logs:/var/www/html/storage/logs
depends_on:
- database
- redis
Expand All @@ -59,8 +57,6 @@ services:
restart: unless-stopped
environment:
CONTAINER_ROLE: websocket
volumes:
- ./logs:/var/www/html/storage/logs
depends_on:
- database
- redis
Expand All @@ -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:
Expand All @@ -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"
Expand Down

0 comments on commit 1635e1e

Please sign in to comment.