Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nginx Reverse Proxy + Node.js + MySQL

Full Cycle Docker challenge: Nginx as a reverse proxy in front of a Node.js app that writes names into MySQL. Everything starts with a single Compose command on port 8080.

Challenge goals

  • Nginx proxies HTTP traffic to Node

  • Node inserts a name into MySQL (people table)

  • Response HTML:

    <h1>Full Cycle Rocks!</h1>

    plus the list of names stored in the database

  • docker compose up -d brings the full stack up on :8080

  • dockerize waits for MySQL before Node starts

Architecture

Browser → Nginx (:8080) → Node.js → MySQL
Service Role
nginx Reverse proxy (public port 8080 → 80)
node App that inserts/lists people
db MySQL 5.7 with init scripts

Prerequisites

  • Docker & Docker Compose

Quick start

git clone https://github.com/fellipesg/desafio-docker-node-fullcycle.git
cd desafio-docker-node-fullcycle

docker compose up -d --build

Open: http://localhost:8080

Stop:

docker compose down

Project layout

├── docker-compose.yml
├── nginx/          # Reverse proxy image & config
├── node/           # Node.js app + entrypoint (dockerize)
└── db/             # MySQL bootstrap SQL

What this demonstrates

  • Docker Compose multi-service orchestration
  • Nginx as reverse proxy
  • Container dependency ordering (depends_on + dockerize)
  • Simple Node ↔ MySQL integration in containers

License

Educational project — Full Cycle course challenge.

About

Nginx reverse proxy + Node.js + MySQL with Docker Compose (Full Cycle)

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages