Gravitee Docker Compose
Setting up Gravitee API Platform Using Docker Compose with Nginx Proxy and SSL
In this guide, we’ll walk through the process of setting up the Gravitee API Management Platform using Docker Compose, Nginx as a reverse proxy, and SSL secured with Certbot on Ubuntu 22.04.
Prerequisites
Ensure the following tools are installed on your system:
Docker
Docker Compose
Nginx
Certbot
OS: Ubuntu 22.04
Installing Docker and Docker Compose
Install Docker
Update existing packages:
Install prerequisite packages for HTTPS access:
Add GPG key for the Docker repository:
Add Docker repository to APT sources:
Install Docker:
Check Docker status:
Install Docker Compose
Download Docker Compose:
Set permissions:
Check Docker Compose version:
Setting Up Gravitee API Management Platform
Create a folder for Gravitee:
Download the Docker Compose file:
Update the Docker Compose file: Replace
localhost
with your server's public IP address:Start Gravitee services:
Verify containers are running:
Access Gravitee Services
API Management:
http://<SERVER-IP>:8084
API Portal:
http://<SERVER-IP>:8085
Default Login Credentials:
Username:
admin
Password:
admin
Setting Up Nginx and Certbot for SSL
Install Certbot and Nginx
Install Certbot:
Install Nginx:
Start and verify Nginx:
Configure Nginx for Gravitee Services
Navigate to the Nginx
sites-available
directory:Create configuration files: For each service, create a new Nginx configuration file. Replace
portal.domain.com
,gravitee-api.domain.com
, and other domains with your actual domains.
Example: portal.conf
for the Gravitee API Portal (port 8085):
Repeat for other services:
api.conf
(Management API, port 8083)apim.conf
(API Management UI, port 8084)gateway.conf
(Gateway API, port 8082)
Enable configurations:
Add Domains to DNS Record
Add DNS records:
portal.domain.com
gravitee-api.domain.com
gateway.domain.com
Obtain SSL Certificates
Run Certbot to obtain SSL certificates for each domain:
Updating Gravitee Docker Compose Configuration
Stop Gravitee services:
Update
docker-compose.yml
: Replace the URLs with the secured domains:Restart Gravitee services:
Final URLs
Gravitee API Management UI:
https://gravitee.domain.com
Gravitee API Portal UI:
https://portal.domain.com
Gravitee Backend API:
https://gravitee-api.domain.com
Gravitee Gateway API:
https://gateway.domain.com
Your Gravitee API Management Platform is now up and running with secure SSL connections!
Last updated