Welcome to Gholi Fly, a multi-service Go application orchestrated with Docker Compose and NGINX. This project contains multiple primary microservices:
- Bank Service – located in
micro-services/bank
- Hotel Service – located in
micro-services/hotel
The project provides separate configurations for development (hot reload) and production environments.
Each service requires two configuration files:
- Development:
config-dev.json
- Production:
config.json
-
Navigate to each service folder:
cd micro-services/bank cp sample-config.json config-dev.json cp sample-config.json config.json cd ../hotel cp sample-config.json config-dev.json cp sample-config.json config.json
-
Copy the
air-template.toml
to each service folder as.air.toml
:cp air-template.toml micro-services/bank/.air.toml cp air-template.toml micro-services/hotel/.air.toml
To run the project in development mode with hot reload:
- Start all services:
docker-compose -f docker-compose-dev.yaml up --build
- Access the services:
-
Bank Service:
http://localhost:8080
-
Hotel Service:
http://localhost:8081
-
Terminal Route Service:
http://localhost:8082
-
User:
http://localhost:8083
-
Transportation:
http://localhost:8084
-
Vehicle:
http://localhost:8085
-
Agency:
http://localhost:8086
-
NGINX (Proxy):
http://localhost:8888
To run the project in production mode:
- Ensure the
config.json
files are set up for each service. - Start the services:
docker-compose up --build
- Access the NGINX reverse proxy:
http://localhost/api/v1/
-
Configurations: Always create
config-dev.json
andconfig.json
from the providedsample-config.json
in each service directory. -
Hot Reload: Air is used in development mode. Make sure
.air.toml
exists in each service directory. -
NGINX: The reverse proxy configuration is in
nginx-config-dev.conf
(development) andnginx-config.conf
(production). -
Databases: PostgreSQL and Redis are started automatically via Docker Compose.