* OS: Ubuntu
* RAM: 256 MB
* CPU: 1 Core
* DISK: 8 GB
Instructions for Ubuntu. You must copy & paste the entire command blocks below when running the commands, not one line at a time.
For obvious security reason, you should NOT run this application as root
user. Setup an unprivileaged user account with sudo access using the following command:
adduser --disabled-password --gecos '' mercury && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
adduser mercury sudo && \
chown -R mercury:mercury /home/mercury/.*
Next, we'll install required initial tools:
apt-get install wget unzip make -y
Lastly setup ssh public key authentication by following this guide: https://serverpilot.io/docs/how-to-use-ssh-public-key-authentication
Login as mercury
(newly setup user) and continue with the remaining steps below.
wget https://github.com/latheesan-k/MercuryBot-Deploy/archive/refs/heads/main.zip && \
unzip main.zip && \
mv MercuryBot-Deploy-main MercuryBot && \
rm -f main.zip
cd MercuryBot && \
make install && \
make ssl
sudo reboot
command
Modify the MercuryBot/docker-compose.yml
with appropriate settings:
environment:
API_USER: dev
API_PASS: dev
NETWORK: testnet
API_USER
Authentication usernameAPI_PASS
Authentication passwordNETWORK
Cardano network (usetestnet
ormainnet
)
Execute the following command to boot up the application:
make up
MercuryBot will be running on: https://your-server-ip
Verify the application running correctly using the following curl
command:
curl --insecure --location --request GET 'https://your-server-ip' \
--header 'X-API-USER: dev' \
--header 'X-API-PASS: dev'
You should see a response like this:
{"status":200,"data":{"message":"Welcome to MercuryBot 1.0.0","version":"cardano-cli 1.27.0 - linux-x86_64 - ghc-8.10","build":"git rev 8fe46140a52810b6ca456be01d652ca08fe730bf"}}
up
Turn on / restart the applicationdown
Turn off the applicationupgrade
Download the latest version & restart the applicationstatus
View the status of the running applicationstats
View the resource usage (CPU, RAM, IO etc...) by the applicationlogs
View application logsshell
Drop into running application's container shellinstall
Installs dockerssl
Generates new apache self-signed certificates