Skip to content

Commit

Permalink
Merge branch 'main' into feature/frontend/selection-field
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian702 authored Mar 8, 2024
2 parents 643f262 + f6dbc1d commit 3474d77
Show file tree
Hide file tree
Showing 15 changed files with 206 additions and 25 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
*secret.yaml
private_key.yaml
.DS_STORE
*.pem
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
kind-up:
./hacks/kind-up.sh

deploy:
./hacks/deploy.sh

kind-deploy:
docker compose -f ./docker-compose.build.yml build
kind load docker-image kioku-frontend:latest kioku-carddeck_service:latest kioku-frontend_proxy:latest kioku-srs_service:latest kioku-user_service:latest kioku-collaboration_service:latest kioku-notification_service:latest
./hacks/deploy.sh ./hacks/values_local.yaml
7 changes: 4 additions & 3 deletions backend/services/user/handler/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func New(s store.UserStore, cS pbCollaboration.CollaborationService) *User {
}

func (e *User) Register(ctx context.Context, req *pbCommon.User, rsp *pbCommon.Success) error {
logger.Infof("Received User.Register request: email: %v", req.UserEmail)
logger.Infof("Received User.Register request")
if _, err := e.store.FindUserByEmail(ctx, req.UserEmail); err == nil {
return helper.NewMicroUserAlreadyExistsErr(helper.UserServiceID)
} else if !errors.Is(err, helper.ErrStoreNoExistingUserWithEmail) {
Expand Down Expand Up @@ -73,6 +73,7 @@ func (e *User) Register(ctx context.Context, req *pbCommon.User, rsp *pbCommon.S
}

func (e *User) VerifyUserExists(ctx context.Context, req *pbCommon.User, rsp *pbCommon.Success) error {
logger.Infof("Received User.VerifyUserExists request")
user, err := e.store.FindUserByEmail(ctx, req.UserEmail)
if err != nil {
return err
Expand Down Expand Up @@ -117,7 +118,7 @@ func (e *User) DeleteUser(ctx context.Context, req *pbCommon.User, rsp *pbCommon
}

func (e *User) Login(ctx context.Context, req *pbCommon.User, rsp *pbCommon.User) error {
logger.Infof("Received User.Login request: email: %v", req.UserEmail)
logger.Infof("Received User.Login request")
user, err := e.store.FindUserByEmail(ctx, req.UserEmail)
if err != nil {
if errors.Is(err, helper.ErrStoreNoExistingUserWithEmail) {
Expand All @@ -136,7 +137,7 @@ func (e *User) Login(ctx context.Context, req *pbCommon.User, rsp *pbCommon.User
}

func (e *User) GetUserIDFromEmail(ctx context.Context, req *pbCommon.User, rsp *pbCommon.User) error {
logger.Infof("Received User.GetUserIDFromEmail request: %v", req)
logger.Infof("Received User.GetUserIDFromEmail request")
user, err := e.store.FindUserByEmail(ctx, req.UserEmail)
if err != nil {
if errors.Is(err, helper.ErrStoreNoExistingUserWithEmail) {
Expand Down
7 changes: 3 additions & 4 deletions backend/store/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"os"
"strings"
"time"

"github.com/kioku-project/kioku/pkg/helper"
"go.opentelemetry.io/otel"
Expand Down Expand Up @@ -45,9 +44,9 @@ func NewPostgresStore(ctx context.Context) (*gorm.DB, error) {
logger := logger.New(
logrus.NewWriter(),
logger.Config{
SlowThreshold: time.Millisecond,
LogLevel: logger.Warn,
Colorful: false,
LogLevel: logger.Silent,
Colorful: false,
IgnoreRecordNotFoundError: true,
},
)

Expand Down
50 changes: 50 additions & 0 deletions docker-compose.build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
version: "3"

services:
frontend_proxy:
container_name: kioku-frontend_proxy
restart: always
build:
context: backend
dockerfile: services/frontend/Dockerfile

user_service:
container_name: kioku-user_service
restart: always
build:
context: backend
dockerfile: services/user/Dockerfile

carddeck_service:
container_name: kioku-carddeck_service
restart: always
build:
context: backend
dockerfile: services/carddeck/Dockerfile

collaboration_service:
container_name: kioku-collaboration_service
restart: always
build:
context: backend
dockerfile: services/collaboration/Dockerfile

srs_service:
container_name: kioku-srs_service
restart: always
build:
context: backend
dockerfile: services/srs/Dockerfile

notification_service:
container_name: kioku-notification_service
restart: always
build:
context: backend
dockerfile: services/notification/Dockerfile

frontend:
container_name: kioku-frontend
restart: always
build:
context: frontend
6 changes: 5 additions & 1 deletion frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ yarn-error.log*
next-env.d.ts

# Storybook
build-storybook.log
build-storybook.log

# Lingui
messages.ts
messages.d.ts
4 changes: 0 additions & 4 deletions frontend/locales/de/messages.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion frontend/locales/de/messages.ts

This file was deleted.

4 changes: 0 additions & 4 deletions frontend/locales/en/messages.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion frontend/locales/en/messages.ts

This file was deleted.

Loading

0 comments on commit 3474d77

Please sign in to comment.