JavaScript - Node.js + Redis
Node.js is a framework for the JavaScript language that allows you to create a web application using only this language, running JavaScript on the server side instead of in the browser. It is compatible with all other JavaScript frameworks, as well as with its own plugins and extensions.
Redis is an in-memory temporary database system that is easy to use and configure and achieves high efficiency and speed. Thanks to its caching system, it allows faster access to the data queried most frequently.
Project structure
.
βββ app
βΒ Β βββ package.json
βΒ Β βββ package-lock.json
βΒ Β βββ server.js
βββ app.Dockerfile
βββ compose.yaml
βββ nginx
β βββ default.conf
βββ backup
β βββ backup-runner.sh
βββ .env
βββ .env.example
Deploying the application:
We change to the directory that contains the files required to build the container:
cd /root/stack/python/flask-mysql
We bring up the application:
docker compose up -d
Useful commands:
See the containers that are running:
docker compose ps
Stop and remove the application:
docker compose down
Rebuild the application after making changes to the code:
docker compose up -d --build