Stop the Environment

The stop-onecx.sh script is used to stop the OneCX Local Environment. It can be run from the root directory of the onecx-local-env repository. Here the command for stopping the essential services without removing data:

./stop-onecx.sh

Available Flags

The script accepts several optional flags to customize its behavior. Some flags can be combined. The flags are:

-c

Cleans up all volumes associated with the OneCX Local Environment when stopping the services. This will remove all data stored in the volumes, so use this flag with caution. (Default: disabled)

-e

The edition of OneCX to stop. This must match the edition that was used to start the environment. Supported editions are:

  • v2 (Default).

  • v1

-h

Displays help information about the script and its available flags. If used then all other options are ignored.

-p <profile-name>

The profile to use when stopping the environment. This must match the profile that was used to start the environment. The supported profiles are:

  • base (Default)

  • all

Examples

Stop base and Cleanup

The Docker services essential for OneCX will be terminated, including the deletion of all data. Technically, this involves deleting the Docker volumes used by OneCX.

./stop-onecx.sh -c

Stop ALL and Cleanup

All Docker services for OneCX will be terminated, including the deletion of all data. Technically, this involves deleting the Docker volumes used by OneCX.

./stop-onecx.sh -p all -c