A multi-tier Java web application fully containerized with Docker and auto-provisioned on a Vagrant virtual machine. Images are built and published to Docker Hub, and the entire stack spins up automatically on vagrant up — no manual setup required.
This project containerizes the Vprofile application stack using Docker and Docker Compose, with a Vagrant-managed Ubuntu VM that automatically installs Docker and pulls all images from Docker Hub on first boot.
Tech Stack:
| Layer | Technology |
|---|---|
| Web Server | Nginx (Reverse Proxy) |
| Application | Apache Tomcat 10 + Java 21 |
| Database | MySQL 8.0 |
| Cache | Memcached |
| Message Broker | RabbitMQ |
| Containerization | Docker & Docker Compose |
| VM Provisioning | Vagrant + VirtualBox |
Browser
│
▼
[vproweb] Nginx :80 ← jemdevops/vprofileweb
│
▼
[vproapp] Tomcat :8080 ← jemdevops/vprofileapp
│ │ │
▼ ▼ ▼
[vprodb] [vprocache01] [vpromq01]
MySQL Memcached RabbitMQ
:3306 :11211 :5672
| Image | Description |
|---|---|
jemdevops/vprofileapp |
Multi-stage Maven build → Tomcat 10 runtime |
jemdevops/vprofiledb |
MySQL 8 pre-seeded with accounts schema |
jemdevops/vprofileweb |
Nginx reverse proxy to Tomcat |
# Clone the repository
git clone https://github.com/jemarzan/vprofile-docker-containerization.git
cd vprofile-docker
# Start and auto-provision the VM
vagrant upThat's it. Vagrant will:
- Spin up an Ubuntu 22.04 VM
- Install Docker and Docker Compose
- Pull all images from Docker Hub
- Run
docker compose up -dautomatically
| URL | Description |
|---|---|
http://192.168.56.16 |
Vprofile Web App (via Nginx) |
http://localhost |
Same via forwarded port |
Default login: admin_vp / admin_vp
services:
vprodb # MySQL 8 — port 3306
vprocache01 # Memcached — port 11211
vpromq01 # RabbitMQ — port 5672
vproapp # Tomcat app — port 8080
vproweb # Nginx proxy — port 80Services start in dependency order via depends_on:
vprodb, vprocache01, vpromq01 → vproapp → vproweb
VM boots, Docker installs, all 5 images pulled and running automatically.
Accessible at
http://192.168.56.16
First request pulls from DB and inserts into cache. Subsequent requests serve from Memcached.
Confirms RabbitMQ connections, channels, exchanges, and queues are active.
# SSH into the VM
vagrant ssh
# Check running containers
docker compose ps
# View logs
docker compose logs -f
# Restart the stack
docker compose down && docker compose up -d
# Pull latest images and restart
docker compose pull && docker compose up -d
# Stop and destroy the VM
vagrant destroyIf you want to rebuild images from source:
# Build all images from Dockerfiles
docker compose up -d --build
# Push to Docker Hub
docker compose pushJem — DevOps Portfolio Project
Docker Hub: hub.docker.com/u/jemdevops