Skip to content

Commit 8410beb

Browse files
committed
update to new version
1 parent fe6bf61 commit 8410beb

File tree

8 files changed

+12
-28
lines changed

8 files changed

+12
-28
lines changed

auth

Submodule auth updated 39 files

build.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#!/bin/bash
22

3-
# Function to build a Docker image for a given folder
43
build_docker_image() {
54
local folder="$1"
6-
local service_name=$(basename "$folder")
5+
local service_name="nestjs-microservices-$(basename "$folder")"
76
if [[ -e "$folder/Dockerfile" ]]; then
87
echo ">>> Building service ${service_name}..."
98
if docker build -t "${service_name}:latest" -f "$folder/Dockerfile" "$folder"; then
@@ -14,10 +13,10 @@ build_docker_image() {
1413
fi
1514
}
1615

17-
# Export the function to be used by parallel
18-
export -f build_docker_image
19-
20-
# Find all directories with a Dockerfile and build images in parallel
21-
find . -maxdepth 1 -type d -not -path '.' -print0 | xargs -0 -n 1 -P $(nproc) bash -c 'build_docker_image "$0"'
16+
for dir in */; do
17+
if [[ -e "${dir}/Dockerfile" ]]; then
18+
build_docker_image "$dir"
19+
fi
20+
done
2221

2322
echo ">>> All builds completed"

deploy.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
#!/bin/bash
22

3-
# Function to log into AWS ECR
43
aws_ecr_login() {
54
echo ">>> Logging into AWS ECR"
65
aws ecr get-login-password --region "$AWS_REGION" | docker login --username AWS --password-stdin "$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com"
76
}
87

9-
# Function to build and push Docker image
108
build_and_push_image() {
119
local service_name="$1"
1210
local image_name="nestjs_$service_name:latest"
@@ -32,7 +30,6 @@ build_and_push_image() {
3230
fi
3331
}
3432

35-
# Main script execution
3633
printf "Please select service:\n"
3734
select d in */; do
3835
test -n "$d" && break

docker-compose.dep.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,11 @@ services:
3030
ports:
3131
- "6379:6379"
3232

33-
mongodb:
34-
image: mongo:latest
35-
ports:
36-
- "27017:27017"
37-
volumes:
38-
- mongo_data:/data/db
39-
4033
networks:
4134
backend:
4235
driver: bridge
4336

4437
volumes:
4538
pg_data:
46-
driver: local
4739
rabbit_data:
48-
driver: local
49-
mongo_data:
50-
driver: local
5140
redis_data:
52-
driver: local

files

Submodule files updated from 4bff3a1 to 0ea3649

notification

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "nestjs-microservices",
3-
"version": "1.0.0",
4-
"description": "Nestjs RabbitMQ Microservices",
3+
"version": "2.0.0",
4+
"description": "Nestjs RabbitMQ Microservices with Saga pattern",
55
"scripts": {
66
"deploy": "sh deploy.sh",
77
"build": "sh build.sh",

post

Submodule post updated 1 file

0 commit comments

Comments
 (0)