This script automates the setup of local Gravitee APIM or AM environments using Docker Compose.
It downloads the necessary files, configures environment variables, and launches the containers.
If something fails, it rolls back all changes (containers, volumes, networks, and directories).
component
(optional): Eitherapim
oram
. Defaults toapim
if not specified.version
(optional): Gravitee version. If not provided, uses a timestamped "latest" version.-h
or--help
: Shows usage instructions and examples.
# Create APIM environment with version 4.3.0
./giocompose apim 4.3.0
# Create AM environment with the latest version
./giocompose am
# Create APIM environment with the latest version
./giocompose
# Create AM environment with a specific version
./giocompose am 4.3.0
# Show help and usage instructions
./giocompose --help
The script will:
- Download Docker Compose and
.env
files from Gravitee repositories - Patch
.env
with the chosen version and NGINX port - Run
docker compose up -d
- Roll back