This is a sample rails app, running on port 3000, which connects to a MySQL database.
381
This is a sample Rails application which runs on Carina and is backed by a MySQL database hosted on the Rackspace Cloud Database service.
Create a MySQL database in the IAD region in the Rackspace Cloud Control Panel. Note the host name, and credentials as it will be needed in the next step.
Run the carinamarina/try-rails container. Update the DATABASE_URL environment
variable with your database connection details.
docker run --name rails \
--env DATABASE_URL="mysql://username:password@host/dbname" \
--detach \
--publish-all \
carinamarina/try-rails
Identity the port where the rails application was published. In the example below, the port is 32800.
$ docker port rails
3000/tcp -> 172.99.65.237:32800
Open http://<dockerHost>:<containerPort>, for example http://172.99.65.237:32800. You should see the Powered By Carina badge if the database connection was successful.

Content type
Image
Digest
Size
321.1 MB
Last updated
about 10 years ago
docker pull carinamarina/try-rails