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:
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:
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
The store will run at
The admin will run at
The Merchants API will run at
Or, if only the Merchants API is enabled, then it will run right at
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:
sudo su -git clone https://github.com/bitcartcc/bitcart-dockercd bitcart-dockerexport BITCART_INSTALL=backendexport BITCART_HOST=api.yourdomain.tld./setup.sh
And on another one (with admin and store), you would run:
sudo su -git clone https://github.com/bitcartcc/bitcart-dockercd bitcart-dockerexport BITCART_INSTALL=frontendexport BITCART_ADMIN_HOST=admin.yourdomain.tldexport BITCART_STORE_HOST=store.yourdomain.tldexport BITCART_ADMIN_API_URL=https://api.yourdomain.tldexport BITCART_STORE_API_URL=https://api.yourdomain.tld./setup.sh