A developer refactors Docker files for microservices, updates build processes with pnpm, and configures an automated CI/CD pipeline in Google Cloud Build. The process includes defining a cloudbuild.yaml file, setting up GitHub repository triggers, and verifying automatic container builds and deployments.
Length 8:57
Captions English (Generated), Spanish (Auto-translated), French (Auto-translated), Korean (Auto-translated), Portuguese (Auto-translated), Vietnamese (Auto-translated) #docker #ci/cd #google cloud build #automation #microservices #pnpm #pipeline #deployment #software engineering #cloud
0:00 So instead of having to CD directly into the 0:03 microservice and run pnpm install again, we can remove this 0:07 line, and then we'll remove our pnpm install 0:10 from our 0:11 first root package.json, move it after we 0:15 copy over the services we need, including apps auth 0:19 and the common libs folder, paste the pnpm install back in, 0:23 and then add a -r flag to pnpm install, 0:27 which means recursive, which will go through each 0:31 project in the workspace and pnpm install, which 0:35 is exactly what we want to do in this case. 0:37 So let's copy this command and go ahead and do the same thing in the 0:40 rest of our 0:41 projects. I'll go ahead and replace all of the p- 0:45 pnpm installs with this pnpm install 0:48 -r. We'll go ahead and do the same thing for the payments 0:52 Docker file here, 0:54 and lastly, for the reservations Docker file. 1:01 Sure that we don't forget to copy over the 1:04 nestcli.json. So make sure 1:08 we copy that over because that contains important information about 1:11 how to actually 1:12 build our app. So let's go ahead and add this line to all of our Docker 1:16 files underneath the tsconfig.json 1:21 to make sure that we do copy this over as well. 1:30 Next, since we're copying over the nestcli.json, 1:33 I wanna 1:34 explicitly tell the pnpm run build command here that 1:38 we're just building auth, and we don't get confused and try to 1:41 build any other service here. So let's go ahead 1:44 and update all the Docker 1:45 files now to explicitly build the 1:49 application that we are in. So I'll go ahead and add this to 1:52 notifications, payments, and lastly, 1:55 reservations here. 1:58 Now, before you start your containers back up, 2:01 make sure you run pnpm 2:02 install -r from the root here to make sure we have all of our node
The rest of the transcript is for members.
Sign in