[hw-8] add: comment service

This commit is contained in:
3ybacTuK
2025-07-26 23:47:18 +03:00
parent 6420eaf3d7
commit 6e0d90a6d5
29 changed files with 1249 additions and 725 deletions

View File

@@ -5,9 +5,9 @@ MIGRATIONS_FOLDER := ./db/migrations/
LOCAL_DB_NAME := route256
LOCAL_DB_DSN := postgresql://user:password@localhost:5433/route256?sslmode=disable
PROD_USER := loms-user
PROD_PASS := loms-password
PROD_DB := postgres-master
PROD_USER := comments-user
PROD_PASS := comments-password
PROD_DB := postgres-comments-shard
PROD_MIGRATIONS := ./comments/db/migrations/
@@ -20,7 +20,8 @@ bindir:
# Used for CI
run-migrations:
$(GOOSE) -dir $(PROD_MIGRATIONS) postgres "postgresql://$(PROD_USER):$(PROD_PASS)@$(PROD_DB):5432/comments_db?sslmode=disable" up
$(GOOSE) -dir $(PROD_MIGRATIONS) postgres "postgresql://$(PROD_USER)-1:$(PROD_PASS)-1@$(PROD_DB)-1:5432/comments_db?sslmode=disable" up
$(GOOSE) -dir $(PROD_MIGRATIONS) postgres "postgresql://$(PROD_USER)-2:$(PROD_PASS)-2@$(PROD_DB)-2:5432/comments_db?sslmode=disable" up
db-create-migration:
$(BINDIR)/goose -dir $(MIGRATIONS_FOLDER) create -s $(n) sql