A simple (and tiny) Pastie clone written in Sinatra and ActiveRecord. Clone from repo https://github.com/zapnap/toopaste.
-
Git clone repo:
git clone https://github.com/budhrg/toopaste -
Bundle Install:
bundle install -
Start the web server as:
rackup [-p port_number] -
Using a browser, go to
http://localhost:9292(or port_number)
-
Git clone repo:
git clone https://github.com/budhrg/toopaste -
Pull mysql image from repo:
docker pull mysql:5.5 -
Build image of Toopaste:
docker build -t toopaste . -
Run Toopaste as:
4.1 Run mysql container:
docker run --name <mysql_container_name> -e MYSQL_ROOT_PASSWORD=<password> -d mysql:5.5
4.2 Run toopaste:
docker run --name <toopaste_container_name> --link <mysql_container_name>:<alias> -e "DB_PREFIX=<alias>" -p <ur_machine_port>:9292 -d toopaste sh -c "rake db:create && rake db:migrate rackup -o 0.0.0.0"
or
docker run --name <toopaste_container_name> --link <mysql_container_name>:<alias> -e "DB_PREFIX=<alias>" -p <ur_machine_port>:port_number -d toopaste sh -c "rake db:create && rake db:migrate rackup -o 0.0.0.0 -p port_number"
Note: Give alias in capital
- Using a browser, go to
http://localhost:<ur_machine_port>