The project's purpose is for the interactive deployment of a Digital Ocean droplet and setup of a Docker Compose file which spawns an Nginx webserver with SSL enabled.
The script uses calls with the Digital Ocean API directly for the Droplet creating and setup using Ansible
Python +v3.x
sudo apt-get install virtualenv
virtualenv -p python3 venv
. venv/bin/activate
pip install -r requirements.txt
- Edit 'env.json' with the desired values.
- Create a Digital Ocean API token. (How-to)
- Customize 'docker-compose.yml' file to your needs. (Documentation)
python3 run_deployment.py
Configure 'config' JSON document inside 'run_deployment.py' file.
python3 run_deployment.py
Replace 'docker-compose.yml' with the following:
---
version: "3.2"
services:
test:
image: tutum/hello-world
container_name: test
ports:
- 5000:80
Navigate to http://<Droplet_IP>:5000/ to see the results.