Build a CRUD API with Docker Node.JS Express.JS & PostgreSQL

preview_player
Показать описание


#Node #postgreSQL #docker

🔗 Resources

🔥 All my links

📚 Chapters

00:00 Intro
00:31 Init Server + DB
12:50 Dockerize application
23:47 Test application

🔖 Topics Covered

- Docker
- Build a backend
- Nodejs Express Server
- PostgreSQL database
- Dockerized backend
Рекомендации по теме
Комментарии
Автор

Here's a breakdown of each of the Dockerfile commands :) also don't mind the buggy facecam at the end of the video lol

FROM - specifies the base image for the Docker image you are creating. All subsequent instructions in the Dockerfile will be applied on top of this base image.

WORKDIR - sets the working directory for any subsequent instructions that follow it in the Dockerfile. This is where commands like RUN and COPY will be executed.

COPY - copies files or directories from the host machine to the Docker image. The first argument is the path to the file or directory on the host machine, and the second argument is the destination path in the Docker image.

RUN - executes a command in the Docker image. This can be used to install packages, run build commands, and do other tasks required to configure the image.

EXPOSE - documents the ports that the Docker image is expected to listen on when it is run. It does not actually publish the ports.

CMD - specifies the command to run when the Docker container is started from the image. If the Docker container is started with a command-line argument, it will override the CMD instruction. There can only be one CMD instruction in a Dockerfile, and it should be the last instruction.

Smoljames
Автор

Damn, I've never seen this Docker configuration. I've started learning backdev recently and the amount of project configurations is just mindblowing. It's really easy to get lost in this whole ocean of information

jiipoud
Автор

aswome, best rich example in minutes, dude your amazing, you just clarify everything as you go !
thx

tunisiasparx
Автор

Great video!!! If you are interested, I found a docker tutorial to simplify the exercise of creating the Dockerfile and the compose.yaml: run "npm i", then "docker init" and follow the instructions. The npm i command is to create the necessary package-lock.json.

Your explanations are great, the commands I mentioned serve as shortcuts, but thanks to you we can understand what they really do.

juanmam.b.
Автор

Great job. it really helped! Thank you

rwayneleon
Автор

now in the same project can you please add kubernetes connectivity too?

yatharthm
Автор

Great tutorial. Really helped! Thank you <3

jindrichknedla
Автор

Is this the way to create tables inside docker container of postgres ??

What is the better and industry standard way ? Please explain

sammed.sankonatti
Автор

Is there a specific reason for using commonjs modules over ES6 modules?

denyscole
Автор

I can't find this code on your git hub

timlinator
Автор

If I wanted to connect my pgAdmin to the postgres on the container how would I do this? I've spent more time than I'd like to admit trying to get that to work but with no results. Help would me much appreciated.

Jrist