{"id":25545161,"url":"https://github.com/iambotcoder/vprofile-docker","last_synced_at":"2026-02-09T03:30:19.272Z","repository":{"id":278037653,"uuid":"934320250","full_name":"iambotcoder/Vprofile-docker","owner":"iambotcoder","description":"The \"VProfile Project - Docker Compose Setup\" automates the deployment and orchestration of essential services, including database, caching, messaging, and web application components, using Docker Compose.","archived":false,"fork":false,"pushed_at":"2025-02-17T16:46:14.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-17T17:32:52.814Z","etag":null,"topics":["automation","containerization","devops","docker","docker-compose","vprofile"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iambotcoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-17T16:25:11.000Z","updated_at":"2025-02-17T16:49:02.000Z","dependencies_parsed_at":"2025-02-17T17:43:19.545Z","dependency_job_id":null,"html_url":"https://github.com/iambotcoder/Vprofile-docker","commit_stats":null,"previous_names":["iambotcoder/vprofile-docker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iambotcoder%2FVprofile-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iambotcoder%2FVprofile-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iambotcoder%2FVprofile-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iambotcoder%2FVprofile-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iambotcoder","download_url":"https://codeload.github.com/iambotcoder/Vprofile-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239800429,"owners_count":19699128,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","containerization","devops","docker","docker-compose","vprofile"],"created_at":"2025-02-20T08:18:06.617Z","updated_at":"2026-02-09T03:30:19.229Z","avatar_url":"https://github.com/iambotcoder.png","language":null,"readme":"\n# 🚀 VProfile Project - Docker Compose Setup\n\n---\n\n## 📖 Overview\nThis document provides a step-by-step guide to setting up a **Vagrant Virtual Machine** using **Ubuntu Jammy**. The setup includes networking, resource allocation, and provisioning options to automate the development environment.\n\n---\n\n## 📑 Table of Contents\n\n- [Prerequisites](#-prerequisites) 🔑\n- [Architecture](#-architecture) 🗺️\n- [Setup \u0026 Installation](#-setup-and-installation) 🛠️\n- [Vagrant Setup](#-vagrant-setup) 🐾\n- [Docker Setup](#-docker-setup) 🐳\n- [Cleaning Up Resources](#-cleaning-up-resources) 🧹\n- [Conclusion](#-conclusion) ✅\n\n---\n\n## 🔑 Prerequisites\nBefore starting, ensure you have the following installed:\n- [Vagrant](https://www.vagrantup.com/downloads)\n- [VirtualBox](https://www.virtualbox.org/wiki/Downloads)\n- A terminal or command prompt with administrative privileges\n\n---\n\n## 🗺️ Architecture\nThis project utilizes Vagrant to set up an **Ubuntu virtual machine** with the following configurations:\n\n- **Base OS:** Ubuntu Jammy 64-bit\n- **Networking:**\n  - Private network with a static IP (`192.168.56.14`)\n  - Public network for external access\n- **Resource Allocation:**\n  - Memory: 1600MB\n  - CPUs: 2\n- **Synced Folder:**\n  - Maps `D:\\scripts\\shellscripts` on the host to `/opt/scripts` in the VM\n- **Provisioning (Optional):**\n  - Can be configured to install packages (like Apache) automatically\n\n### Workflow:\n1. **Initialize Vagrant** – Create the required configuration.\n2. **Start the VM** – Boot the virtual machine.\n3. **Access the VM** – SSH into the machine.\n4. **Validate Network Settings** – Check assigned IPs.\n5. **Destroy the VM** – Cleanup once testing is complete.\n\n---\n\n## 🛠️ Setup \u0026 Installation\n### 1⃣ Initialize Vagrant:\n```bash\nvagrant init\n```\n\n---\n\n## 🐾 Vagrant Setup 🖥️\n\nBelow is the `Vagrantfile` configuration used for this project:\n\n```ruby\nVagrant.configure(\"2\") do |config|\n  # Use Ubuntu Jammy 64-bit box\n  config.vm.box = \"ubuntu/jammy64\"\n\n  # Configure private network with specific IP\n  config.vm.network \"private_network\", ip: \"192.168.56.82\"\n\n  # Configure public network (Bridged network)\n  config.vm.network \"public_network\"\n\n  # VirtualBox specific configuration\n  config.vm.provider \"virtualbox\" do |vb|\n    vb.memory = \"2048\"\n  end\n\n  # Keep the default insecure SSH key\n  config.ssh.insert_key = false\n\n  # Provisioning with shell script to install Docker and Docker Compose\n  config.vm.provision \"shell\", inline: \u003c\u003c-SHELL\n    sudo apt-get update\n    sudo apt-get install ca-certificates curl gnupg -y\n\n    sudo install -m 0755 -d /etc/apt/keyrings\n    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg\n    sudo chmod a+r /etc/apt/keyrings/docker.gpg\n\n    echo \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release \u0026\u0026 echo \"$VERSION_CODENAME\") stable\" | sudo tee /etc/apt/sources.list.d/docker.list \u003e /dev/null\n\n    sudo apt-get update\n    sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y\n\n    sudo curl -L \"https://github.com/docker/compose/releases/download/v2.1.1/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\n    chmod +x /usr/local/bin/docker-compose\n  SHELL\nend\n\n```\n\n### 2⃣ Start the Virtual Machine:\n```bash\nvagrant up\n```\n\n### 3⃣ Check VM Status:\n```bash\nvagrant status\n```\n\n### 4⃣ SSH into the VM:\n```bash\nvagrant ssh\n```\n\n### 5⃣ Check Network Configuration:\n```bash\nip addr show\n```\n\n### 6⃣ Exit the VM:\n```bash\nexit\n```\n\n---\n\n## 🐳 Docker Setup\n\n### 1⃣ **Install Docker inside the VM**:\n```bash\nsudo apt-get update\nsudo apt-get install -y docker.io\n```\n\n### 2⃣ **Verify Docker Installation**:\n```bash\ndocker --version\n```\n\n### 3⃣ **Run a Test Container**:\n```bash\ndocker run hello-world\n```\n\n### 4⃣ **Docker Compose Setup**:\nInstall Docker Compose inside the VM if it's not already installed:\n```bash\nsudo apt-get install -y docker-compose\n```\n\n### 5⃣ **Create a `docker-compose.yml` File**:\nIn your VM, create a `docker-compose.yml` file with the following content:\n```yaml\nversion: '3.8'\nservices:\n  vprodb:\n    image: vprofile/vprofiledb\n    ports:\n      - \"3306:3306\"\n    volumes:\n      - vprodbdata:/var/lib/mysql\n    environment:\n      - MYSQL_ROOT_PASSWORD=vprodbpass\n\n  vprocache01:\n    image: memcached\n    ports:\n      - \"11211:11211\"\n\n  vpromq01:\n    image: rabbitmq\n    ports:\n      - \"15672:15672\"\n    environment:\n      - RABBITMQ_DEFAULT_USER=guest\n      - RABBITMQ_DEFAULT_PASS=guest\n\n  vproapp:\n    image: vprofile/vprofileapp\n    ports:\n      - \"8080:8080\"\n    volumes:\n      - vproappdata:/usr/local/tomcat/webapps\n\n  vproweb:\n    image: vprofile/vprofileweb\n    ports:\n      - \"80:80\"\n\nvolumes:\n  vprodbdata: {}\n  vproappdata: {}\n```\n\n### 6⃣ **Start Docker Compose Services**:\nNavigate to the directory where the `docker-compose.yml` file is located, then run:\n```bash\ndocker-compose up -d\n```\n\n### 7⃣ **Verify Running Containers**:\n```bash\ndocker-compose ps\n```\n\n### 8⃣ **Stop Docker Compose Services**:\n```bash\ndocker-compose down\n```\n\n---\n\n## 🧹 Cleaning Up Resources\n\nTo remove the VM and free up system resources, run the following commands in order:\n\n### 1⃣ Destroy the Virtual Machine:\n```bash\nvagrant destroy\n```\n\n### 2⃣ Remove Unused Vagrant Instances:\n```bash\nvagrant global-status --prune\n```\n\n---\n\n## ✅ Conclusion\n\nThis project demonstrates how to automate VM provisioning using **Vagrant and VirtualBox**, making it easier to manage development and testing environments efficiently. It also integrates Docker to facilitate containerized application deployment within the VM.\n\n---\n\n## 👨‍🏫 Instructor\n\nThis project was guided by **Imran Teli**, who provided valuable mentorship throughout the process.\n\n---\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiambotcoder%2Fvprofile-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiambotcoder%2Fvprofile-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiambotcoder%2Fvprofile-docker/lists"}