Manual Deployment
The process is basically the following:
    1.
    Install python3
    2.
    Install nodejs and yarn
    3.
    Install postgresql
    4.
    Install redis
    5.
    Clone and run all parts of BitcartCC

Warning: Not recommended to use in production

Manual installation is NOT recommended in production. It should be only used for learning purpose.
Instead you should use the docker deployment.
The docker deployment will provide you easy update system and make sure that all moving parts are wired correctly without any technical knowledge. It will also setup HTTPS for you.

Typical manual installation

This steps have been done on ubuntu 18.04, adapt for your own install.

1) Install Python 3

Usually it might have already been installed, but we also need pip3 and dev packages, so:
1
sudo apt install python3 python3-pip python3-dev
Copied!

2) Install Node.JS and Yarn

1
sudo apt install nodejs
2
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
3
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
4
sudo apt remove cmdtest # comes preinstalled on ubuntu 18.04, overrides yarn
5
sudo apt update && sudo apt install yarn
Copied!

3) Install PostgresSQL

Note, replace REPLACEME with your new postgres password.
1
sudo apt install postgresql postgresql-contrib
2
sudo -u postgres createdb bitcart
3
sudo -u postgres psql -U postgres -d postgres -c "alter user postgres with password 'REPLACEME';"
Copied!

4) Install Redis

1
sudo apt install redis-server
Copied!

5) Clone and prepare BitcartCC components

BitcartCC core(daemons) & Merchants API:

1
git clone https://github.com/bitcartcc/bitcart
2
cd bitcart
3
sudo pip3 install -r requirements.txt
4
sudo pip3 install -r requirements/production.txt
5
sudo pip3 install -r requirements/daemons/btc.txt
Copied!
For any other daemon(coin) you want to use, run:
1
sudo pip3 install -r requirements/daemons/coin_name.txt
Copied!
Where coin_name is coin code(btc, ltc, etc.).
Create a file conf/.env It contains all the settings. For now, we just need to set database password and enabled cryptos.
1
# Replace REPLACEME with your database password
2
# specify used cryptocurrencies with BITCART_CRYPTOS
3
4
cat > conf/.env << EOF
5
DB_PASSWORD=REPLACEME
6
BITCART_CRYPTOS=btc,ltc
7
EOF
Copied!
Apply database migrations:
1
alembic upgrade head
Copied!

BitcartCC admin panel

1
git clone https://github.com/bitcartcc/bitcart-admin
2
cd bitcart-admin
3
yarn
4
yarn build
Copied!

BitcartCC store

1
git clone https://github.com/bitcartcc/bitcart-store
2
cd bitcart-store
3
yarn
4
yarn build
Copied!

Run everything

BitcartCC core(daemons) & Merchants API:

Start daemons:
1
python3 daemons/btc.py
Copied!
For any other coin, do the similar procedure:
1
python3 daemons/coin_name.py
Copied!
Start api:
1
gunicorn -c gunicorn.conf.py main:app
Copied!
Start background worker:
1
python3 worker.py
Copied!

BitcartCC admin panel

1
yarn start
Copied!

BitcartCC store

1
NUXT_PORT=4000 yarn start
Copied!
Your BitcartCC API will run on port 8000, daemons on ports 5000-500X, admin panel on 3000, store on 4000.

Upgrading manual deployment

Note: it is recommended to use docker deployment for easy upgrades.
To upgrade manually, follow the following steps:

1) Stop everything already running

Merchants API, workers, daemons, Admin panel and Store should be stopped

2) Pull latest changes

Run :
1
git pull
Copied!
For every BitcartCC component directory (Merchants API, Admin Panel, Store).

3) Upgrade dependencies

BitcartCC core(daemons) & Merchants API:

1
sudo pip3 install -r requirements.txt
2
sudo pip3 install -r requirements/production.txt
3
sudo pip3 install -r requirements/daemons/btc.txt
Copied!
BitcartCC admin
1
yarn
Copied!
BitcartCC store
1
yarn
Copied!

4) Apply new database migrations

In BitcartCC core(daemons) & Merchants API directory, run:
1
alembic upgrade head
Copied!

5) Rebuild store and admin

For BitcartCC Admin Panel and Store, run:
1
yarn build
Copied!

6) Start everything again

Follow instructions here
Last modified 11mo ago