One domain mode
One domain mode is an opt-out feature, enabled by default, which simplifies the configuration of domains.One domain mode allows running all BitcartCC services under one domain.
If you are deploying a new instance from the BitcartCC Configurator, it is the default mode enabled.
But this was not always the case, one domain mode was added in BitcartCC version 0.3.0.0.
You only need to set one environment variable to run BitcartCC: BITCART_HOST.
All the services will run either under the root domain, or the suburls on that domain.
One domain mode is enabled, when the following settings are unset:
  • BITCART_ADMIN_HOST
  • BITCART_ADMIN_URL
  • BITCART_STORE_HOST
  • BITCART_STORE_URL
Depending on the configuration, the service that will run on the root domain is selected in the following order (if available): store, admin, api.
So, if all 3 components are enabled, and BITCART_HOST is bitcartcc.mydomain.com, then:
  • The store will run at https://bitcartcc.mydomain.com
  • The admin will run at https://bitcartcc.mydomain.com/admin
  • The Merchants API will run at https://bitcartcc.mydomain.com/api
Or, if only the Merchants API is enabled, then it will run right at https://bitcartcc.mydomain.com.

Why is "one domain mode" there, and it is not the only possible configuration variable?

Because despite having the easy-to-use one-domain mode, we also support advanced use cases.
For example, you may need to run Merchants API on one server, and admin and store on another one.
It is completely possible.
On one server (with api), you would run:
1
sudo su -
2
git clone https://github.com/bitcartcc/bitcart-docker
3
cd bitcart-docker
4
export BITCART_INSTALL=backend
5
export BITCART_HOST=api.yourdomain.tld
6
./setup.sh
Copied!
And on another one (with admin and store), you would run:
1
sudo su -
2
git clone https://github.com/bitcartcc/bitcart-docker
3
cd bitcart-docker
4
export BITCART_INSTALL=frontend
5
export BITCART_ADMIN_HOST=admin.yourdomain.tld
6
export BITCART_STORE_HOST=store.yourdomain.tld
7
export BITCART_ADMIN_API_URL=https://api.yourdomain.tld
8
export BITCART_STORE_API_URL=https://api.yourdomain.tld
9
./setup.sh
Copied!
Last modified 10mo ago