Project to demonstrate using Docker to:
- Build nginx:alpine web container that acts as reverse proxy and forwards requests to application server
- Build python3:alpine app container that deploys python code to query random random song from list of 100 songs store in mysql database
- Use docker-compose to build app, web and database containers and expose port 80 to host system
- Docker installed and configured OR a node on Play with Docker
git clone https://github.com/skipluck/bestsongs-docker
chmod 644 /root/bestsongs-docker/db/dbdump.sql
cd bestsongs-docker
docker-compose up -d
curl localhost
run the command again to display a different random song
Launch browser on host system and naviate to http://localhost
. Refresh the page to display a different random song
Launch browser on host system and use the following URL pattern http://ip<hyphen-ip>-<session_jd>-<port>.direct.labs.play-with-docker.com
(i.e: http://ip172-18-0-10-bc23mf7ndhl000d01gm0.direct.labs.play-with-docker.com/). Refresh the page to display a different random song
docker-compose stop