feat: update environment configuration for RabbitMQ and Redis services in docker-compose
Deploy Application / deploy (push) Failing after 7s
Details
Deploy Application / deploy (push) Failing after 7s
Details
This commit is contained in:
parent
27c465342d
commit
95323b9f65
15
.env.example
15
.env.example
|
|
@ -16,3 +16,18 @@ 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
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue