feat: update environment configuration for RabbitMQ and Redis services in docker-compose
Deploy Application / deploy (push) Failing after 7s Details

This commit is contained in:
Habib Fatkhul Rohman 2025-12-02 15:33:40 +07:00
parent 27c465342d
commit 95323b9f65
3 changed files with 29 additions and 3 deletions

View File

@ -15,4 +15,19 @@ SMTP_HOST=smtp.gmail.com
SMTP_PORT=587 SMTP_PORT=587
SMTP_SENDER_NAME="Go.Gin.Template <no-reply@testing.com>" SMTP_SENDER_NAME="Go.Gin.Template <no-reply@testing.com>"
SMTP_AUTH_EMAIL=<your email> SMTP_AUTH_EMAIL=<your email>
SMTP_AUTH_PASSWORD=<your password> SMTP_AUTH_PASSWORD=<your password>
# rabbitmq
RABBITMQ_HOST=rabbitmq
RABBITMQ_PORT=5672
RABBITMQ_USER=guest
RABBITMQ_PASSWORD=guest
RABBITMQ_MANAGEMENT_PORT=15672
RABBITMQ_LOG_QUEUE=log_queue
# redis
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=redis
REDIS_DB=0
REDIS_CACHE_TTL_MINUTES=60

View File

@ -22,8 +22,6 @@ func InitRabbitMQ() {
user, pass, host, port, user, pass, host, port,
) )
fmt.Println("Connecting to RabbitMQ:", uri)
conn, err := amqp.Dial(uri) conn, err := amqp.Dial(uri)
if err != nil { if err != nil {
log.Printf("RabbitMQ connect error: %v\n", err) log.Printf("RabbitMQ connect error: %v\n", err)

View File

@ -27,8 +27,21 @@ services:
networks: networks:
- default - default
redis:
image: redis:alpine
restart: always
container_name: redis
command: ["redis-server", "--requirepass", "redis"]
volumes:
- redis-data:/data
ports:
- "${REDIS_PORT:-6379}:6379"
networks:
- default
volumes: volumes:
app-data: app-data:
redis-data:
networks: networks:
default: default: