Skip to content

πŸŽ™οΈ [λ”œλ¦¬λ²„λΈ”] μ•„λ‚˜μš΄μ„œ μ‰λ„μž‰μœΌλ‘œ ν‚€μš°λŠ” μŠ€ν”ΌμΉ˜ μžμ‹ κ°

License

Notifications You must be signed in to change notification settings

DeliverBle/deliverble-recording-microservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

62 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

deliverble-recording-microservice

Recording S3 upload dedicated Microservice to deliverble restful server

Architecture

architecture.png

This module?

does

  • connect your mp3 file in byte format to communicate with deliverble s3 bucket
  • only deliverble restful server is allowed to communicate with the MSA module

does not

  • provide any other functionality other than uploading mp3 file in s3 bucket
  • delete feature, change naming feature or listing all recordings by User Identity should be done in the restful server (nothing to do with bucket itself)

How to start

go get -u google.golang.org/grpc
go get google.golang.org/grpc/cmd/protoc-gen-go-grpc
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
protoc -I=. \
	    --go_out . --go_opt paths=source_relative \
	    --go-grpc_out . --go-grpc_opt paths=source_relative \
	    protos/v1/user/user.proto

Docker Commands

docker buildx build --platform linux/amd64 -f ./Dockerfile -t deliverble-recording-microservice .
aws ecr get-login-password --region ap-northeast-2 | docker login --username AWS --password-stdin 175045290745.dkr.ecr.ap-northeast-2.amazonaws.com
docker tag deliverble-recording-microservice:latest 175045290745.dkr.ecr.ap-northeast-2.amazonaws.com/deliverble-recording-microservice:latest
docker push 175045290745.dkr.ecr.ap-northeast-2.amazonaws.com/deliverble-recording-microservice:latest

Production Command (AWS ECR)

aws configure
aws ecr get-login-password --region ap-northeast-2
sudo docker login -u AWS -p ${PASSWORD} 175045290745.dkr.ecr.ap-northeast-2.amazonaws.com/deliverble-recording-microservice
aws ecr list-images --repository-name "deliverble-recording-microservice" --region ap-northeast-2
sudo docker pull 175045290745.dkr.ecr.ap-northeast-2.amazonaws.com/deliverble-recording-microservice:latest
sudo docker run -itd -p 8020:8020 -p 8000:8000 175045290745.dkr.ecr.ap-northeast-2.amazonaws.com/deliverble-recording-microservice:latest

Push to GitHub Packages

export CR_PAT=${GITHUB_TOKENS}
echo $CR_PAT | docker login ghcr.io -u DeliverBle --password-stdin
docker tag deliverble-recording-microservice:latest ghcr.io/deliverble/deliverble-recording-microservice:latest
docker push ghcr.io/deliverble/deliverble-recording-microservice:latest

Heads up!

  • If you are looking to resolve ECR push EOF error, see here
  • If Dockerfile cannot find your Go app in working directory, see here

About

πŸŽ™οΈ [λ”œλ¦¬λ²„λΈ”] μ•„λ‚˜μš΄μ„œ μ‰λ„μž‰μœΌλ‘œ ν‚€μš°λŠ” μŠ€ν”ΌμΉ˜ μžμ‹ κ°

Resources

License

Stars

Watchers

Forks

Packages

No packages published