Skip to content

odennav/docker-earth-site

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploying the Earth Website with Docker

Deployment automated with bash scripts in Test environment.

Overview

Automate deployment of the Earth website with an Nginx server using Docker images and containers. This repository includes scripts to push Docker images to your DockerHub repository and clean up deployment on local machine(optional).


Getting Started

To enhance your learning experience, virtual machines (VMs) have been configured for you to run and test the scripts using Vagrant. The provided Vagrant file simplifies VM management.

  1. Install Vagrant:

    If you haven not installed Vagrant, download it here and follow the installation instructions for your OS.

  2. Install Docker:

    On Windows: If you intend to use git bash with Windows and not linux VM, install chocolatey here.

    Open powershell terminal and use chocolatey to install git bash.

    choco install git

    Install Docker Desktop by following the instructions here.

    On Linux: Install Docker Engine by following the instructions here.

  3. Spin up VM:

    vagrant up cool
  4. Access the VM:

    vagrant ssh cool
  5. Clone the Repository:

    Clone this repository to your Linux VM to get the scripts and the Vagrant file. Install git in VM.

    sudo apt-get install git
    git clone https://github.com/odennav/docker-earth-site.git
    cd docker-earth-site
  6. Practice with the Scripts:

    Open a script file with a text editor of your choice, and type out every line of code for hands-on learning and to understand how it works

  7. Download HTML template from Tooplate.com and extract webfiles to working directory:

    cd bash-scripts/
    bash get_html.sh
  8. Automate deployment of highway website run with docker containers:

    cd bash-scripts/
    bash nginx_earth_deploy.sh

Clean Up Deployment(Optional)

Delete docker images and containers used to host nginx website:

cd bash-scripts/
bash clean_up.sh 

Contribution Guidelines

If you have your own scripts or improvements, feel free to contribute! Suggestions and enhancements are welcome.

Happy Scripting!