This repository contains the Docker infrastructure setup for the Gulaii microservices system.
To run the entire backend system:
-
Clone this repository:
git clone https://github.com/Gylaii/infrastructure.git cd infrastructure
-
Run the startup script:
sh startup.sh
- Wait for the services to start (this may take several minutes for the first run as Gradle downloads dependencies)
Note
Optionally you can read logs to checkup on system: docker-compose logs -f
- Once running, the following services will be available:
API Gateway: http://localhost:8080
User Service: http://localhost:8081
KeyDB
: Message broker for inter-service communicationAPI Gateway
: Entry point for frontend clients; protects gulaii microservices backendUser Service
: Handles user authentication and managementPostgreSQL
: Database for the user service
- If you see "Connection refused" errors in the logs, wait a few minutes. The services are still starting up.
- First-time builds can take 2-3 minutes as Gradle downloads dependencies.
If services fail to start, try rebuilding with:
docker-compose down -v
docker-compose up -d --build
- Create a repo for your service
- Add simple dockerfile (look at api gateway and user service). It should just
copy your project and do
gradle run
. - Ensure you're using correct keydb env variables
- Add your service to
docker-compose.yml
(make sure to use unique port) - If you're using databases - add your new volume to the
volumes
section - Add your service to
startup.sh
script