Code Monkey home page Code Monkey logo

arc_rackspace's Introduction

Arc Rackspace

Arc Rackspace provides an Arc storage back-end for Rackspace.

WARNING: This is a development version: It contains the latest changes, but may also have several known issues, including crashes and data loss situations. In fact, it may not work at all.

Installation

Add the latest stable release to your mix.exs file:

defp deps do
  [
    arc_rackspace: "~> 0.0.3"
  ]
end

You must also add arc_rackspace as startup dependencies your application's mix.exs file:

def application do
  [mod: {MyApp, []},
   applications: [:phoenix, :phoenix_pubsub, :phoenix_html, :cowboy, :logger, :gettext,
                 :phoenix_ecto, :postgrex, :arc_rackspace]]
end

Then run mix deps.get in your shell to fetch the dependencies.

Configuration

To store your attachments in Rackspace Cloud Files, you'll need to provide a bucket destination in your application config:

config :arc,
  storage: Arc.Storage.Rackspace,
  rackspace_container_name: 'default',
  rackspace_cdn_url: 'http://XYZ.r54.cf3.rackcdn.com/'

In addition, Rackspace must be configured with the appropriate credentials.

config :rackspace, :api,
  api_key:  "xxxxxxxxxxxxx",
  username: "yyyyyyyyyyyyy",
  password: "zzzzzzzzzzzzz"

Connection to Rackspace API's will require your username and either your account password, or your account api key. It is recommended that you use the api key which can be obtained by logging into your Rackspace account.

You probably want to load the private key from an ENV variable rather than hard-code it the config.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License and Author

Author: 2016-2017 Anton Maminov

Copyright: 2016-2017 Lokalebasen.dk

This project is licensed under the MIT license, a copy of which can be found in the LICENSE file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.