Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/microservices-patterns/ftgo-application/llms.txt

Use this file to discover all available pages before exploring further.

This page explains how to deploy the FTGO application on your local machine using Docker Compose. It covers the required environment variables, how to build the services, start the full stack — including infrastructure services like MySQL, Kafka, and Zipkin — and how to tear everything down when you’re done.

Prerequisites

Before you begin, make sure you have the following installed and available:
  • Java 8 or later — required to run the Gradle build
  • Docker and Docker Compose — required to build images and start containers
  • 16 GB RAM — the application runs many services simultaneously; a 16 GB machine (such as a 16 GB MacBook Pro) is recommended
  • Internet access — Gradle and Docker need to download dependencies and container images

Environment variables

The docker-compose.yml file references several version variables that must be set before running any Compose commands. These are defined in gradle.properties:
VariableValue in gradle.propertiesPurpose
EVENTUATE_COMMON_VERSION0.15.0.RELEASEEventuate Common library and images
EVENTUATE_MESSAGING_KAFKA_IMAGE_VERSION0.15.0.RELEASEEventuate Kafka Docker image
EVENTUATE_CDC_VERSION0.13.0.RELEASEEventuate CDC service image
EVENTUATE_JAVA_BASE_IMAGE_VERSIONBUILD-15Base Java image for service builds
The Gradle composeUp task reads these from gradle.properties automatically. You do not need to export them manually when using Gradle.

Setting DOCKER_HOST_IP

On most systems (Docker for Mac, Docker for Windows, Docker Desktop on Linux), containers are accessible via localhost and you do not need to set DOCKER_HOST_IP. If you are using Docker Toolbox or running Docker on a remote machine, set DOCKER_HOST_IP to the IP address that is reachable by both your host machine and Docker containers. Do not use localhost, 127.0.0.1, or an unresolvable hostname. The quickest way to set it is to source the provided script:
source ./set-env.sh
This script reads the IP from DOCKER_HOST if it is set (as Docker Toolbox does), and also sets COMPOSE_HTTP_TIMEOUT=240 to prevent timeouts during slow image pulls.
Do not set DOCKER_HOST_IP to localhost or 127.0.0.1. Docker containers use this value to reach services on your host, and those addresses do not resolve correctly from inside a container.
You can verify your DOCKER_HOST_IP value is reachable from containers with:
docker run -p 8889:8888 \
  -e DOCKER_DIAGNOSTICS_PORT=8889 \
  -e DOCKER_HOST_IP \
  --rm eventuateio/eventuateio-docker-networking-diagnostics:0.2.0.RELEASE

Deploying the application

1

Build Spring Cloud Contracts

Run the following command from the repository root to generate the Spring Cloud Contract stubs:
./gradlew buildContracts
2

Build the services

Compile and assemble all service JARs:
./gradlew assemble
3

Start the full stack

Start all infrastructure and application services using the Gradle Compose plugin:
./gradlew :composeUp
Note the leading : in :composeUp — this targets the root project task. Starting all containers can take several minutes on the first run as Docker pulls images.
This command starts both the infrastructure services and all FTGO application services defined in docker-compose.yml.

Infrastructure services

composeUp starts the following infrastructure services alongside the application:
ServiceImagePort
Zookeepereventuateio/eventuate-zookeeper2181
Kafkaeventuateio/eventuate-kafka9092
MySQLBuilt from ./mysql3306
DynamoDB LocalBuilt from ./dynamodblocal8000
Zipkinopenzipkin/zipkin:2.219411
CDC Serviceeventuateio/eventuate-cdc-service8099
Kafka GUI (Kowl)quay.io/cloudhut/kowl9088
The CDC (Change Data Capture) service monitors MySQL binlog for all service schemas — ftgo_consumer_service, ftgo_order_service, ftgo_kitchen_service, ftgo_restaurant_service, ftgo_accounting_service, ftgo_delivery_service, and ftgoorderhistoryservice — and publishes events to Kafka.

Application service ports

Once running, the FTGO services are available on the following ports:
ServiceHost portSwagger UI
ftgo-consumer-service8081http://localhost:8081/swagger-ui/index.html
ftgo-order-service8082http://localhost:8082/swagger-ui/index.html
ftgo-kitchen-service8083http://localhost:8083/swagger-ui/index.html
ftgo-restaurant-service8084http://localhost:8084/swagger-ui/index.html
ftgo-accounting-service8085http://localhost:8085/swagger-ui/index.html
ftgo-order-history-service8086http://localhost:8086/swagger-ui/index.html
ftgo-api-gateway8087No Swagger UI — use curl
ftgo-delivery-service8089http://localhost:8089/swagger-ui/index.html
If containers are not accessible via localhost (for example, when using Docker Toolbox), replace localhost with ${DOCKER_HOST_IP} in all URLs above.
The API gateway at port 8087 routes requests to the order service and consumer service. It does not expose a Swagger UI; use curl or a tool like Postman to call it directly.

Stopping the application

To stop all containers and remove them:
./gradlew :composeDown

Troubleshooting

Containers not accessible via localhost

If you are using Docker Toolbox, Docker runs in a VirtualBox VM and your containers are not reachable at localhost. You must set DOCKER_HOST_IP to the VM’s IP address:
source ./set-env.sh
Then use ${DOCKER_HOST_IP} instead of localhost when accessing service URLs or configuring environment variables.

Compose HTTP timeout errors

If you see timeout errors during composeUp, the set-env.sh script sets COMPOSE_HTTP_TIMEOUT=240 (240 seconds) to give slow image pulls more time to complete:
export COMPOSE_HTTP_TIMEOUT=240

Services fail to start

Services depend on MySQL, Kafka, and the CDC service being ready. If a service exits early, wait for the infrastructure containers to be fully healthy and re-run composeUp. The CDC service itself depends on both MySQL and Kafka.

Build docs developers (and LLMs) love