-
Go Gin https://gin-gonic.com
-
PostgreSQL - DOCKER - postgres:16.3-alpine3.20
-
Redis - DOCKER - redis:7-alpine
-
RabbitMQ - Docker composed - rabbitmq:3-management
-
Used golang-migrate for Migrations
-
Used go mock for Mocking in API testing on DB Store
-
Zerolog for Advanced Logging
-
Amqp library for RabbitMQ interaction github.com/streadway/amqp
-
AWS SDK for S3
- Fork the repo
- Ensure you have go installed
- Port 8083 is used for API Backend. Adjust accordingly if being altered in imageprocessor_microservice as well .
Install make to utilize make file commands.
Postgres image
make postgres
Redis Local
make postgres
RabbitMQ docker script
make rabbitmq
Open a Public S3 Bucket from AWS
Setup environment [appp.env]
ENVIRONMENT=development
DB_SOURCE=postgresql://root:secret@localhost:5432/prod-mgm?sslmode=disable
DB_DRIVER=postgres
MIGRATION_URL=file://db/migration
HTTP_SERVER_ADDRESS=0.0.0.0:8083
AWS_ACCESS_KEY_ID= <access key >
AWS_SECRET_ACCESS_KEY= <secret access >
AWS_REGION=us-east-1
AWS_BUCKET_NAME= <bucket name >
REDIS_ADDRESS=0.0.0.0:6379
RABBITMQ_URL="amqp://guest:guest@localhost:5672/"
Ensure Postgresql container is running
make createdb
make migrateup
Ensure you have go installed
go mod tidy
NOW OPEN 2 TERMINALS
Terminal 1:- Main Backend code
go run main.go
Terminal 2:- Image Processing Microservice
cd ./imageprocessor_microservice
go run main.go
make testfull