Before syncing for the first time it would be recommended to increase your droplet ram amount to at least 4GB. You will be able to scale back afterwards for normal day-to-day use as determined by your needs.
For full functionality it is recommended to sync the platform and start ingesting blockchain events, along with starting the queue worker so events are processed. We can do this by running these commands on the platform server using a new tmux session:
tmux new -t workers
Once the session is open create a new pane using
ctrl-bfollowed by double quotes (
"), do this twice so we have three panels open and can run and monitor both workers and the decoder simultaneously then switch to the first pane using
First we will run the decoder that we built earlier:
cd ~/enjin/platform-decoder ./bin/server
Now, we will run the platform sync and ingest commands
Switch to the next pane using
down-arrowand then run the sync command. It will take a few minutes, don't worry if it looks like it gets stuck at around 80%, it'll still be churning through data:
cd /var/www/laravel/ php artisan platform:sync
Once the sync is complete run the ingest worker command to start receiving and processing blockchain events:
php artisan platform:ingest
While the middle pane is working,
Switch to the lower pane using
down-arrowand then run the queue worker which will process and broadcast the platform events, along with any jobs as required:
cd /var/www/laravel/ php artisan queue:work
Your platform setup is now complete and you can start querying blockchain data and creating transactions for your wallet daemon to sign.
To use the GraphQL API, send your requests to the droplet's
yourdomain.com/graphql if you hooked up your domain to the droplet in your providers DNS at the droplet configuration stage.
You can also use the GraphiQL playground at
yourdomain.com/graphiql (notice the extra
i in the URL) if you hooked up your domain to the droplet in your providers DNS at the droplet configuration stage.
Once the workers are running you can detach from the session using
ctrl-b followed by
To reattach to your worker session use this command in the terminal:
tmux a -t workers
There are other useful commands you can use with
tmux, check this resource for more information https://tmuxcheatsheet.com/
Updated 13 days ago