Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

uShare

Cheat sheet.

git clone git@github.com:uploadcare/ushare.git
git remote set-url origin my_heroku_repo_url
git push origin master

I don't want to deploy, I want to share!

1. Heroku.

Generally you can deploy uShare anywhere you like, but the fastest way is to use heroku. First you'll need an account (it's free), heroku's toolbelt and some terminal-like stuff;

2. Create new app.

heroku create my-ushare

3. Clone uShare

Get your copy of uShare repo and get in there:

git clone git@github.com:uploadcare/ushare.git my-ushare
cd my-ushare

4. Set heroku as remote

Set your app's git repo URL (get it from here if you missed it from step #1):

git remote set-url origin git@heroku.com:my-ushare.git

5. Setup database

For Django applications, a Heroku Postgres database is automatically provisioned. This populates the DATABASE_URL environment variable.

Read more about databse and Heroku.

6. Install Uploadcare heroku add-on

heroku addons:add uploadcare

Read more bellow.

7. Finetuning

You may also want to set other system variables, like

  • DJANGO_DEBUG
  • DJANGO_PRODUCTION_MODE
  • DJANGO_SECRET_KEY
  • UPLOADCARE_PUBLIC_KEY - see bellow
  • UPLOADCARE_SECRET_KEY - see bellow

8. Deploy!

git push

Heroku add-on

Uploadcare add-on for Heroku is in alpha stage, so you may not be able to add it to your app. Contact hello@uploadcare.com to be invited to be one of alpha users.

Storage.

uShare uses Uploadcare to store files — its demo-account by default: all files are stored for one day, and DELETED after. If you want a persistent storage, get the Uploadcare subscription and set obtained keys in ushare/settings/local.py file:

UPLOADCARE = {
    'pub_key': 'demopublickey',
    'secret': 'demoprivatekey',
}

Or you can set system variables:

heroku config:set UPLOADCARE_PUBLIC_KEY='MY_PUBLIC_KEY'
heroku config:set UPLOADCARE_SECRET_KEY='MY_SECRET_KEY'

Domain name.

Don't forget to set your domain name in django admin: create a superuser (if you don't have one):

heroku run python manage.py createsuperuser

login into django-admin (available at /admin/ by default) and set the appropriate domain name to your Site-object.

About

No description, website, or topics provided.

Resources

License

Releases

No releases published
You can’t perform that action at this time.