Run a Postgres Database for Free in Google Cloud!

  Рет қаралды 34,958

ScriptBytes

ScriptBytes

Күн бұрын

Пікірлер: 61
@lkym2481
@lkym2481 Жыл бұрын
Thank you so much, man. I used your video to host my first ever Docker container for a job interview challenge. Hopefully they'll think it's pretty cool!
@scriptbytes
@scriptbytes Жыл бұрын
Oh that’s awesome! I’m glad this helped. Good luck, I hope you get the job!
@yasin5603
@yasin5603 Жыл бұрын
God Bless you sir! I've been trying to do it for 4 days. I did it thanks to you! Thank you a lot :)
@scriptbytes
@scriptbytes Жыл бұрын
You’re welcome! I’m glad it helped!
@4115steve
@4115steve 8 ай бұрын
You might consider a playlist series "GCP for beginner", it's difficult to find any decent content to learn GCP as a beginner. Thanks for this video.
@scriptbytes
@scriptbytes 8 ай бұрын
Great suggestion! Thanks for watching.
@vmdcortes
@vmdcortes 4 ай бұрын
Hey, thanks for that, this is pretty useful, specially to do POC and stuff. Thanks again!
@packalacky
@packalacky 8 ай бұрын
Thank you. For reference, the order in which you type the docker flag commands is important, ie putting the port after postgres will throw an error
@VastIllumination
@VastIllumination 7 ай бұрын
Great video! So helpful worked right away.
@diaconescutiberiu7535
@diaconescutiberiu7535 6 ай бұрын
I did everything listed in the video, but i cannot connect to the db via dbeaver client (i'm getting request time out). I tried checking stuff with chatgpt (all settings are correct, i can ping the external ip, i can connect to the db via GC's shell .. but not from dbeaver. I'm on Mac (drivers were installed). I'm stuck
@pedromoreira1311
@pedromoreira1311 Жыл бұрын
Nice tutorial. Thank you!
@scriptbytes
@scriptbytes Жыл бұрын
Thanks for watching!
8 ай бұрын
What would you recommend for production?
@Buckanian
@Buckanian 3 ай бұрын
Does it expire after a time limit lets say 30 days or 90 days?
@erreib
@erreib 10 ай бұрын
Thanks so much for this tutorial. I've created the 5432 firewall rule, added the appropriate network tag to the VM, and started the postgres docker with port 5432 forwarded from the docker to the vm. The connection times out whenever I try to connect. Do you have any suggestions for where I should start troubleshooting?
@erreib
@erreib 9 ай бұрын
I ended up solving it by putting all my cloud run components on the same vpc network. Thanks again for the very informative video!
@scriptbytes
@scriptbytes 9 ай бұрын
Glad you got it working!
@faisalahamedrahat1359
@faisalahamedrahat1359 4 ай бұрын
Can i run other containers as well, alongside the PostgreSQL container. Like node app, redis etc.?....
@scriptbytes
@scriptbytes 3 ай бұрын
You certainly can. Just keep an eye on resource usage if you try and stay in the free tier. It's a pretty small sized server and you may need more resources soon.
@kirindev
@kirindev 2 ай бұрын
thank you very much. ❤
@Glorpin
@Glorpin 8 ай бұрын
After stopping and starting my VM instance, i get the "Connection to refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections." Was working fine before I stopped my instance last night, any solutions? Edit: If i setup a new docker container it allows the connection through. Do I have to setup a new container everytime?
@scriptbytes
@scriptbytes 8 ай бұрын
You have to restart the container after the vm is restarted.
@DARREN_1
@DARREN_1 Жыл бұрын
getting this error when i try to connect Connection to refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. Connection refused: connect Connection refused: connect
@scriptbytes
@scriptbytes Жыл бұрын
Hard to tell without seeing it, might check that the ports are mapped correctly in the docker run command?
@MrLESPERGUER
@MrLESPERGUER Жыл бұрын
hi! I'm guessing you made the same mistake I did. check the database creation command, you must indicate the port 5432:5432. if you don't, you will get that error. check the video at minute 6:44.
@nhaquyennguyen1289
@nhaquyennguyen1289 Жыл бұрын
@@MrLESPERGUER I have same problem how to fix that ? thank
@danielvega646
@danielvega646 Жыл бұрын
Is it possible to do all of this same process but with mySQL?
@scriptbytes
@scriptbytes Жыл бұрын
It should be doable as long as you substitute the correct docker commands
@kubwimanapatrick5425
@kubwimanapatrick5425 Жыл бұрын
Hey... How can I use the this IP address to connect with a backend on on my laptop ... I want to set this up in the .env and use the remote postgres database
@scriptbytes
@scriptbytes Жыл бұрын
You can use the External IP address of the server as the hostname in your connection. So for example in a .Net API, the connection string format would look like this: Host=1.2.3.4;Port=5432;Database=YourDatabaseName;Username=UserName;Password=Password123
@chibuisiamiaka6799
@chibuisiamiaka6799 10 ай бұрын
@@scriptbytes I think we will need to setup a local socket sql connection right? We can do that using cloud_sql_proxy. Example, after installing cloud_sql_proxy, run the following command: cloud_sql_proxy -instances=example-project-dev:us-central1:example-db-name=tcp:5432. Then we can include credentials in the app connection string
@YukzGaming11
@YukzGaming11 Жыл бұрын
What is the reason why Its not good for production?
@scriptbytes
@scriptbytes Жыл бұрын
I should have clarified that better, that's related more to the size of the server. Also you do have to manage backups and server upgrades/updates yourself. Another option would be Cloud SQL, which is a fully managed service on GCP.
@rmcf3972
@rmcf3972 Жыл бұрын
@@scriptbytes cloud sql is not free?
@scriptbytes
@scriptbytes Жыл бұрын
@@rmcf3972 Unfortunately they don't offer a free tier for Cloud SQL. The smallest Postgres database is going to be around $10/mo or so.
@oliverlarsen9388
@oliverlarsen9388 Жыл бұрын
Hey sir. I've had my database up and running for 4 days now i think. When i go to billing it says it has costed me 19 usd now. Am i doing anything wrong?
@oliverlarsen9388
@oliverlarsen9388 Жыл бұрын
It seems like that it is cloud sql that costs
@scriptbytes
@scriptbytes Жыл бұрын
$19 in 4 days sounds like it’s a larger server config. Might check that.
@scriptbytes
@scriptbytes Жыл бұрын
Ya if you decide to use cloud sql there is a cost. There’s no free tier for cloud sql unfortunately.
@NeuronTheDog
@NeuronTheDog Жыл бұрын
Hi, there is an info that the cost of instance is about $6. So it is not entirely for free?
@scriptbytes
@scriptbytes Жыл бұрын
If you only have 1 VM running, and it fits all the criteria, it's free. It shows the cost on the setup screen but it's free if it meets the free tier criteria.
@NeuronTheDog
@NeuronTheDog Жыл бұрын
@@scriptbytes Cool Thanks for clarification.
@River-iw1og
@River-iw1og Жыл бұрын
Why did you make boot disk 20GB? Why not the bare minimum or the maximum?
@scriptbytes
@scriptbytes Жыл бұрын
No reason in particular. Mostly just to show how to do it in case you’d need to go bigger or smaller.
@River-iw1og
@River-iw1og Жыл бұрын
@@scriptbytes If I set the boot disk setting here too high does that mean I lose out on space for my data? Assuming I want to stay within the 30GB max free tier.
@scriptbytes
@scriptbytes Жыл бұрын
@@River-iw1og No, the boot disk in this case is the only disk, so it's just the total amount of space available for your server. The higher the setting here the more space you have for everything on the server.
@ВладиславКоновалов-с5с
@ВладиславКоновалов-с5с Жыл бұрын
It works! Thanks. But i have an issue. Google cloud has blocked my postgres db by two times :( They've said that my project doing crypto mining. I've tried to do like in a video
@scriptbytes
@scriptbytes Жыл бұрын
Sorry I dunno how to help with that.
@johnwyb2027
@johnwyb2027 Жыл бұрын
had the same problem. some official postgres docker images have kinsing malware. if you run 'top' command and see kdevtmpfsi
@nicmantzivis8978
@nicmantzivis8978 Жыл бұрын
Thank you kind Sir
@scriptbytes
@scriptbytes Жыл бұрын
You’re welcome, thanks for watching!
@NextGenSellPOS
@NextGenSellPOS 9 ай бұрын
postgres-db:~$ sudo apt-get install lab-release Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package lab-release I cant find lab-release. please help . and also please share the commands that you did afterwards
@scriptbytes
@scriptbytes 9 ай бұрын
All the commands I used were straight from the docker installation docs link in the description. However it does look like things have changed since this video and the commands are different. I would reference the docs for that section of the video and hopefully that will get it working for you.
@KerptacularGaming
@KerptacularGaming Жыл бұрын
Will I be charged for the external ip address?
@scriptbytes
@scriptbytes Жыл бұрын
No, it mentions that in the free tier docs page: cloud.google.com/free/docs/free-cloud-features#compute "Compute Engine free tier does not charge for an external IP address."
@nathanvanveldhuizen7159
@nathanvanveldhuizen7159 Жыл бұрын
Awesome 👍
@drkreh
@drkreh 9 ай бұрын
thanks sir
@tradergermany5494
@tradergermany5494 Жыл бұрын
excellent
Google Cloud SQL with a Public IP | Tutorial
12:36
ScriptBytes
Рет қаралды 4,9 М.
Setting up a production ready VPS is a lot easier than I thought.
29:50
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
Deploy your Flask app on Google Cloud Platform
17:51
Leslie Wubbel
Рет қаралды 22 М.
Netflix Removed React?
20:36
Theo - t3․gg
Рет қаралды 66 М.
Top 3 FREE DATABASE Hosting for your next app 🔥
2:29
Quiet Coder
Рет қаралды 3,6 М.
Best of CES 2025
14:50
The Verge
Рет қаралды 304 М.
Creating an RDS PostgreSQL Database on the AWS Free Tier
11:20
Vincent Stevenson
Рет қаралды 70 М.
Introducing AlloyDB for PostgreSQL
5:16
Google Cloud Tech
Рет қаралды 34 М.
Learn Database Normalization - 1NF, 2NF, 3NF, 4NF, 5NF
28:34
Decomplexify
Рет қаралды 2,2 МЛН
Manually Deploy to Cloud Run - Updated for Artifact Registry
11:04