Deployment automated with bash scripts in Test environment.
Automate deployment of the Card 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).
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.
-
Install Vagrant:
If you haven't installed Vagrant, download it here and follow the installation instructions for your OS.
-
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.
-
Spin up VM:
vagrant up cool
-
Access the VM:
vagrant ssh cool
-
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-card-site.git cd docker-card-site
-
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
-
Download HTML template from Tooplate.com and extract webfiles to working directory:
cd bash-scripts/ bash get_html.sh
-
Automate deployment of highway website run with docker containers:
cd bash-scripts/ bash nginx_card_deploy.sh
Delete docker images and containers used to host nginx website:
cd bash-scripts/
bash clean_up.sh
If you have your own scripts or improvements, feel free to contribute! Suggestions and enhancements are welcome.
Special thanks to Tooplate for free HTML templates
Cool Deployment!