diff --git a/hw12_13_14_15_calendar/Makefile b/hw12_13_14_15_calendar/Makefile index 68278dd..c4ea6ea 100644 --- a/hw12_13_14_15_calendar/Makefile +++ b/hw12_13_14_15_calendar/Makefile @@ -47,9 +47,9 @@ sender-up: sender-down: docker-compose -f ./cicd/dc_sender.yml down -sheduler-up: +scheduler-up: docker-compose -f ./cicd/dc_sheduler.yml up -d --build -sheduler-down: +scheduler-down: docker-compose -f ./cicd/dc_sheduler.yml down sup-up: @@ -57,4 +57,8 @@ sup-up: sup-down: docker-compose -f ./cicd/dc_sup.yml down +debug: sup-up calendar-up sender-up + +kill: sender-down calendar-down sup-down + .PHONY: build run test lint \ No newline at end of file diff --git a/hw12_13_14_15_calendar/cicd/dc_calendar.yml b/hw12_13_14_15_calendar/cicd/dc_calendar.yml index c56a30c..9af7975 100644 --- a/hw12_13_14_15_calendar/cicd/dc_calendar.yml +++ b/hw12_13_14_15_calendar/cicd/dc_calendar.yml @@ -22,8 +22,4 @@ services: APP_STORAGE_SQLDBASE: calendar APP_STORAGE_SQLUSER: calendar APP_STORAGE_SQLPASS: 12345678 - ports: - - 8888:8888 - - 50051:50051 - - 50053:50053 network_mode: host \ No newline at end of file diff --git a/hw12_13_14_15_calendar/cicd/dc_sup.yml b/hw12_13_14_15_calendar/cicd/dc_sup.yml index c186ce3..c1be174 100644 --- a/hw12_13_14_15_calendar/cicd/dc_sup.yml +++ b/hw12_13_14_15_calendar/cicd/dc_sup.yml @@ -20,8 +20,6 @@ services: POSTGRES_USER: calendar POSTGRES_PASSWORD: 12345678 POSTGRES_DB: calendar - ports: - - 5432:5432 network_mode: host rabbitmq: @@ -33,7 +31,4 @@ services: RABBITMQ_DEFAULT_USER: "rabbit" RABBITMQ_DEFAULT_PASS: "rabbit" RABBITMQ_DEFAULT_VHOST: "/" - ports: - - 15672:15672 - - 5672:5672 network_mode: host \ No newline at end of file diff --git a/hw12_13_14_15_calendar/pkg/rabbit/rabbit.go b/hw12_13_14_15_calendar/pkg/rabbit/rabbit.go index b893dc6..06e99a7 100644 --- a/hw12_13_14_15_calendar/pkg/rabbit/rabbit.go +++ b/hw12_13_14_15_calendar/pkg/rabbit/rabbit.go @@ -60,7 +60,7 @@ func New(conf Config) (*Rabbit, error) { if err != nil { return nil, fmt.Errorf("can't bind Queue on Exchange in RabbitMQ: %w", err) } - return &Rabbit{Connection: conn, Channel: ch}, nil + return &Rabbit{Connection: conn, Channel: ch, Exchange:conf.Exchange, Key: conf.Key, Queue: conf.Queue}, nil } func Attach(conf Config) (*Rabbit, error) {