Backbone Cellar Web App with support for a MySQL back-end provided by a Linked Docker Container
1.3K
"Backbone Cellar" is a sample CRUD application built with Backbone.js and Twitter Bootstrap, originally developed by Christophe Coenraets and published in the backbone-cellar GitHub repository. The application allows you to browse through a list of wines, as well as add, update, and delete wines. This application is further documented here.
The application is also hosted online. You can test it here.
The application is provided with a RESTful back-end implemented in PHP (see the /api directory).
Dockerfile and adaptation to run inside a Docker container created by Germán Moltó for the Curso Online de Cloud Computing con Amazon Web Services.
curl -O https://raw.githubusercontent.com/gmolto/backbone-cellar/master/cellar.sql
docker run --name mysql -p 3306:3306 -e MYSQL_USER=root -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=cellar -d mysql
Change the root password, if required.
mysql -h $DOCKER_HOST_IP -u root -p cellar < cellar.sql
This assumes the $DOCKER_HOST_IP variable populated pointing to the Docker Host. You may omit the -h argument if the Docker engine runs directly on your machine.
docker run -p 80:80 -d --name backbone-cellar-sql-docker --link mysql:mysql backbone-cellar-sql-docker
The application will be exposed at port 80 in the Docker Host: http://Docker_Host_IP
You can let Docker decide a free port in the Docker Host:
docker run -P -d --name backbone-cellar-sql-docker --link mysql:mysql backbone-cellar-sql-docker
Use the following command to find out the used port:
docker port backbone-cellar-sql-docker 80
0.0.0.0:32776
The application will be exposed at: http://Docker_Host_IP:32776
Content type
Image
Digest
Size
301.2 MB
Last updated
almost 5 years ago
docker pull cursocloudaws/backbone-cellar-sql-docker