Start the Environment
The start-onecx.sh script is used to start the OneCX Local Environment. By default, it will start a minimal set of services and import initial mock data on startup. Data imports will not overwrite any custom data that may already exist in the environment and can be skipped using the appropriate flag. The script can be run from the root directory of the onecx-local-env repository:
./start-onecx.sh
|
The script can be executed at any time. Docker checks the configuration of the services and restarts them if there are changes. Without changes, running services are not affected, and only missing services are started. Existing data that was imported or added by the user remains unchanged. |
Available Flags
The script accepts several optional flags to customize its behavior. Some flags can be combined. The flags are:
- -e
-
The edition of OneCX to start. Supported editions are:
-
v2: Starts the current version of OneCX Local Environment (Default). -
v1: Starts the legacy version of OneCX Local Environment (Not recommended for new setups).
-
- -h
-
Displays help information about the script and its available flags.
- -p <profile-name>
-
The profile to use when starting the environment. The supported profiles are:
-
base: Starts a minimal version of OneCX Local Environment with only essential services. (Default) -
all: Starts all available services defined in the Docker Compose file.
-
- -s
-
Enables secure mode, which enforces authentication/authorization and taken into account the tenant ID of the user. (Default: disabled)
When used, the services are started in such a way that they always require authentication AND taken into account the tenant ID, i.e., during import and login on UI!
Consequently, the login takes place in the correct tenant.
- -x
-
Skips the import of initial data after starting the services. (Default: import data according to the used profile)
Examples
Start essential Services
The Docker services essential for OneCX are started. The necessary Docker volumes are created and required data are imported. Technically, these services are labelled with the base profile in the docker-compose file used.
There is no security context defined: * All data are owned by default tenant. * All logins are using the default tenant!
./start-onecx.sh
Start ALL Services
All Docker services for OneCX are started. The necessary Docker volumes are created and required data are imported. Technically, the relevant services are marked with the all profile in the docker-compose file used.
./start-onecx.sh -p all
Start with Security, skipping Import
The Docker services essential for OneCX are started with enabled secure authentication and also the tenant id is taken into account. This is the main precondition for tenant-compliant logins.
The necessary Docker volumes are created but no data are imported.
./start-onecx.sh -s -x
|
If data needs to be imported in a tenant-specific manner, then use the script import-onecx.sh with the appropriate flags after starting the services. |
Additional Started Services
In addition to the original OneCX products, some open-source tools are also used and launched.
Keycloak
Keycloak is an open-source software for Identity and Access Management (IAM) that provides features like single sign-on (SSO), user authentication, and authorization for modern applications and services.
There is an OneCX realm which contains all configurations needed by OneCX like users, roles, clients etc.
-
Username: admin
-
Password: admin
pgAdmin
pgAdmin is a popular, open-source administration and development platform for PostgreSQL databases.
| This service is optional, as it is not strictly necessary for OneCX to function. For a better user experience, use a native client directly on your computer. |
-
Username: admin
-
Password: admin