Command: heroku pgbackups:capture --remote production
Response: >>> HEROKU_POSTGRESQL_COLOR_URL (DATABASE_URL) ----backup---> a712
Command: heroku pgbackups:url [db_key] --remote production
#Docker
##Files and Folders.
|
|\_ app
|...
|\_ docker
| |
First, Create a folder inside of lib called seeds
Put your CSV file example.csv into the lib/seeds folder. In the example below, the file is called real_estate_transactions.csv
Make sure you've created a resource with the appropriate columns to match your seed data. The names don't have to match up.
| @font-face { | |
| font-family: 'EntypoRegular'; | |
| src: url('font/entypo.eot'); | |
| src: url('font/entypo.eot?#iefix') format('embedded-opentype'), | |
| url('font/entypo.woff') format('woff'), | |
| url('font/entypo.ttf') format('truetype'), | |
| url('font/entypo.svg#EntypoRegular') format('svg'); | |
| font-weight: normal; | |
| font-style: normal; | |
| } |
| # SSL self signed localhost for rails start to finish, no red warnings. | |
| # 1) Create your private key (any password will do, we remove it below) | |
| $ openssl genrsa -des3 -out server.orig.key 2048 | |
| # 2) Remove the password | |
| $ openssl rsa -in server.orig.key -out server.key |
| jQuery.ajaxSetup( | |
| beforeSend: (xhr) -> | |
| xhr.setRequestHeader('X-Auth-Token', | |
| App.Session.getAuthenticationToken()) | |
| ) | |
| # ... | |
| class App.Session | |
| # ... | |
| getAuthenticationToken: -> |
| Get the Heroku db as detailed here: | |
| http://devcenter.heroku.com/articles/pgbackups#exporting_via_a_backup | |
| 1. heroku pgbackups:capture | |
| 2. heroku pgbackups:url <backup_num> #=>backup_url | |
| - get backup_num with cmd "heroku pgbackups" | |
| 3. curl -o latest.dump <backup_url> | |
| Then locally do: | |
| $ pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb latest.dump |
| #!/bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: unicorn | |
| # Required-Start: $local_fs $remote_fs mysql | |
| # Required-Stop: $local_fs $remote_fs | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: unicorn initscript | |
| # Description: Unicorn is an HTTP server for Rack application | |
| ### END INIT INFO |