Setup Postgres docker container quick!!
Quick Postgres setup using Docker containers for rapid development/experimenting

Search for a command to run...
Quick Postgres setup using Docker containers for rapid development/experimenting

That is easy. If you know the IP address of your system where you're running the Postgres container(Google "My IP Address" if not), you can connect from other machines by using the same connection string, except replacing locahost with the IP address of the machine where the container is running.
That time I reverse engineered an AI startup to prove a point.

Tired of seeing ../../../components/Button in your React imports? Absolute imports are your solution for cleaner, more maintainable code. Here's how t

When all your colleagues are remote, how to communicate effectively to avoid conflicts and confusions.

Hey Dumbfuck, this is how you set an image saved localy as background with Tailwind in a NextJS project

In this blog, I am keeping a draft example of the modern tsconfig file that works for me in the projects that I am making. { "compilerOptions": { "target": "ESNext", "experimentalDecorators": false, "module": "commonjs", "rootDir": ...
Docker remains the quickest way of setting up a Postgres database server. Here's how to do so.
Sometimes, we just need to set up a postgres database server, and if you have docker - spinning up a container is always the quickest and cleanest way of setting up a Postgres server
For example, when you need to quickly setup a Express Rest API server using PostGres with Prisma, like I need to do today. Here's how you do it.
docker run --rm --name postgres-db -p 5433:5432 -e POSTGRES_PASSWORD=mysecretpassword -d postgres:13-alpine
Please Note: we're mapping port 5432 of the container to port 5433 of your local machine/system/computer on which you are writing code. This is intentional and serves to drive understanding of how ports works. The explanation is below:
postgres-db is the name of the container you spin up. 5432 is the default port at which postgres runs. You can, if you so wish, map your system's port to container's port. In this case, 5433 is the port at which you will find the server on your local machine. mysecretpassword is the password to log in to the db serverpostgres is the default user AND default Database. It is not mentioned in the docker command posted above.postgres:13-alpine is the image we're pulling. Assuming everything runs without an error, you can connect to the server using the connection string in the following format: postgresql://default_user:password@localhost:5432/default_db?schema=public
Therefore, your string becomes
postgresql://postgres:mysecretpassword@localhost:5433/postgres?schema=quotes
And that's it.
If you'd like to know how to connect to this (or any) postgres server using Shell/Terminal, you can find it in an upcoming blog.