#Gitlab CI/CD

24 messages · Page 1 of 1 (latest)

vernal niche
#

Can anyone help me with the CI/CD and dockerfile for my nestjs project?

outer dagger
#

Depends: what's the problem?

vernal niche
#

I don't have any idea about it I want to deploy the API on AWS and make gitlab pipeline

outer dagger
#

Do you have any CI experience?

vernal niche
#

No

#

I don't

#

😦

flat owl
#

And do you have experience with building a dockerfile and deploying it to AWS?

vernal niche
#

Yes I just saw that

#

Built a Dockerfile and a docker compose file its working perfectly fine it is server ready

#

But I don't get the pipeline part

flat owl
#

it would help if you could describe what exactly you don't understand. Also I'm sure there are many tutorial online for Gitlab CI specifically

vernal niche
#

There is a API in nestJS on my local machine so I used docker to create a container now I want to setup gitlab pipeline so whenever I push any changes and merge it with dev branch it should be automatically deployed/updated on aws server

outer dagger
vernal niche
#

😃

vernal niche
#

MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted. Make sure your current IP address is on your Atlas cluster's IP whitelist: https://www.mongodb.com/docs/atlas/security-whitelist/
at _handleConnectionErrors (/app/node_modules/mongoose/lib/connection.js:792:11)
at NativeConnection.asPromise (/app/node_modules/mongoose/lib/connection.js:1429:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

#

Getting this error on AWS

outer dagger
#

How are you running mongo? Is it set to handle this kind of connection?

vernal niche
#

How to do that?

outer dagger
#

Look at the link that was added in the error message

vernal niche
#

It's saying that the server IP is not whitelisted so I added the server's elastic IP to mongodb network access but still the error continues

#

Are there any changes required in code?.. Because I dockerised the Nest app and its working fine on my machine but the error persist on server

outer dagger
#

Did you use the server's public or private IP address?

vernal niche
#

I associated the pubic IP with elastic IP