This repository contains all necessary files and instructions to perform on-premise installation of Everytrade product.
- Create a droplet at DigitalOcean. Select Ubuntu 20.04 as image. Choose at least 4GB RAM. Choose a password or SSH key (recommended) and give name to your droplet.
- Go to your terminal and log into your droplet:
ssh root@droplet-ipwith the IP address of the droplet substituted fordroplet-ip. - After you are in your root folder run this instalation command:
curl -s -O https://raw.githubusercontent.com/everytrade-io/everytrade-install/master/install.sh && bash install.sh - Add your licence key when terminal ask. You received the key to your mailbox.
- When the script is finished (it takes few minutes) you can paste your droplet's IP address into your browser. The page will take a some time to load (the application is initializing data). After few more minutes the EveryTrade page will load and subsequent page loads will be almost instant.
- Application is now up and running but not secured with HTTPS. To setup HTTPS (via https://letsencrypt.org/) follow optional procedure bellow.
- This guide assumes domain et.example.com. Use your actual domain name throughout the guide instead.
- Create a DNS type A record pointing to your droplet's IP address at Digital Ocean (or other DNS provider in case you don't use Digital Ocean).
- In terminal connected to your droplet, edit file
/etc/nginx/sites-enabled/everytrade. You can use nano editor for example like this:nano /etc/nginx/sites-enabled/everytrade. Find lineserver_name <droplet-ip-address>and change it toserver_name et.example.com. Save the file. Runsudo nginx -tto check the file is ok. If so, load the new configuration by runningsudo systemctl reload nginx.service. - In terminal connected to your droplet, run
sudo certbot --nginx -d et.example.com. - In terminal connected to your droplet, edit the file
/var/lib/docker/volumes/everytrade_webapp-data/_data/config/everytrade.properties:- Find the line starting
mail.from.name=and change your IP address to your new domain (et.example.comin our case). - Do the same for the line starting with
url=
- Find the line starting
- Restart your docker container by running
sudo docker restart everytrade_webapp_1. - Use your browser to load et.example.com. From now on your connection should be secured using an HTTPS certificate from Let's Encrypt (depicted by a lock icon in your browser's address bar).
- Set up a Google Client ID for your Everytrade installation by using this guide: https://support.google.com/cloud/answer/6158849?hl=en
- In terminal connected to your droplet, edit the file
/var/lib/docker/volumes/everytrade_webapp-data/_data/config/everytrade.properties:- Find the line starting
auth.google.clientId=and insert your Google Client ID from previous step.
- Find the line starting
- Restart your docker container by running
sudo docker restart everytrade_webapp_1. - Use your browser to load et.example.com. From now on you should be able to use your Google accounts for signup or login.
Upgrading everytrade to the latest version is easy. All you need to do is to run following script and your installation will be upgraded to the latest version. There is no need to backup any data.
curl -s https://raw.githubusercontent.com/everytrade-io/everytrade-install/master/upgrade.sh | bashTo upgrade to a specific version use a sightly modified command (don't forget to substitute VERSION_NUMBER with the actual version you want to upgrade to):
curl -s https://raw.githubusercontent.com/everytrade-io/everytrade-install/master/upgrade.sh | bash -s -- --version VERSION_NUMBERDelete certbot configuration for your domain in case out decided to go for the HTTPS setup (substitute et.example.com with your domain/certificate name):
certbot delete --cert-name et.example.comIf you're not sure about your certificate name, you can list all the certbot managed certificates:
certbot certificatesTo remove nginx reverse-proxy configuration for Everytrade, run:
rm /etc/nginx/sites-available/everytrade
rm /etc/nginx/sites-enabled/everytrade
systemctl reload nginx.serviceTo stop the docker containers running Everytrade webapp and database, run:
docker container stop everytrade_webapp_1
docker container rm everytrade_webapp_1
docker container stop everytrade_db_1
docker container rm everytrade_db_1Now there are no more Everytrade-related processes running, but there's still some runtime data left (configuration files, database content, etc.) To remove those, run:
docker volume rm everytrade_webapp-data
docker volume rm everytrade_db-data