This project uses NGINX as a reverse proxy to a Node.js application that inserts a name into MySQL and returns:
<h1>Full Cycle Rocks!</h1>
followed by the list of names stored in the database.
- NGINX (reverse proxy)
- Node.js (Express)
- MySQL 8
- Docker Compose
docker-compose up -dThen open http://localhost:8080.
Each request will:
- Ensure the
peopletable exists - Insert a new random name into
people - Render the header and a list of all names
docker-compose.yml: services fornginx,app, anddbnginx/: reverse proxy configapp/: Node.js applicationdb/init.sql: initializes database and table on first run
- NGINX listens on port 80 inside the container and is published on host port 8080.
- The Node app listens on port 3000 and is only exposed to the Docker network.
- MySQL credentials and DB name are set via environment variables in
docker-compose.yml.
docker-compose down -vThis stops containers and removes the DB volume.