Coder Social home page Coder Social logo

docker_scumblr's Introduction

docker_scumblr

Scumblr with Docker

This repo contains everything you need to deploy a basic instance of Scumblr (https://github.com/netflix/scumblr). Scumblr is a Netflix open source project that allows performing periodic searches and storing / taking actions on the identified results.

Please Note: Deploying this container as-is will provide a working Scumblr instance with an onboard SQLite database. This means that all data will be lost when the container terminates. See the configuration section below for additional setup information.

If you just want to quickly test the application, start with the deployment section below.

Configuration

This section discusses required/optional configuration that can be done prior to deploying Scumblr. Configuration is broken up into the following sections:

  • API Keys (required for most Search providers to work)
  • Admin User (Setup admin credentials)
  • Database (Use a persistent database instead of the default ephemeral SQLite db)
  • SSL

API Keys

Scumblr requires API keys to function. These can be setup in the config/scumblr/scumblr.rb file. Templates are contained in the file. By default these can be set using environment vairables (see Environment Variables below)

Admin User

The default configuration will create the following admin user:

[email protected]:password

These credentials can be set on line 2 the config/scumblr/seeds.rb file. Note: There three fields that need to be changed: email, password, and password_confirmation. Changing the line to the following would set the account email to [email protected] with a password of "new_password":

User.create(:email=>"[email protected]", :password=>"new_password", :password_confirmation=>"new_password", :admin=>true)

Database

The default database will be an onboard SQLite db. This will work for testing but will be lost if the container terminates. To configure a permanent database, setup the database.yml file in config/scumblr/database.yml or use the environment variable (see Environment Variables below). For more information on the database.yml file see http://edgeguides.rubyonrails.org/configuring.html#configuring-a-database.

SSL

This docker container ships with a self-signed cert to be used for SSL. To use a custom key pair/certificate replace the server.key and server.crt files in config/nginx

Environment Variables

The following are environment variables available to configure scumblr:

SCUMBLR_HOST # Default hostname for scumblr (used for email notifications, etc.) i.e. "scumblr.com"
SCUMBLR_PROTOCOL # Default protocol i.e. "https"

SCUMBLR_CREATE_DB # Run rake db:create if true. For initial DB setup.
SCUMBLR_LOAD_SCHEMA # Run rake db:schema:load. For initial DB setup. Will reset DB to default!
SCUMBLR_RUN_MIGRATIONS # Run rake db:migrate if true. Will update database with migrations if included.
SCUMBLR_SEED_STATUSES # Create a default set of statuses if set to "true"
SCUMBLR_SEED_ADMIN # Create an admin user ([email protected]/password) if no users exist and SEED_ADMIN set to "true"

SKETCHY_PORT_443_TCP_ADDR
SKETCHY_PORT_443_TCP_PORT
SKETCHY_USE_SSL
SKETCHY_VERIFY_SSL
SKETCHY_ACCESS_TOKEN
SKETCHY_TAG_STATUS_CODE

RAILS_ENV # Select a rails environment (devlopment, staging, produdction)
DATABASE_URL # Configure a database URL (ex: sqlite3:///db/production.sqlite)

EBAY_ACCESS_KEY

FACEBOOK_APP_ID
FACEBOOK_APP_SECRET

GOOGLE_DEVELOPER_KEY
GOOGLE_CX
GOOGLE_APPLICATION_NAME
GOOGLE_APPLICATION_VERSION

YOUTUBE_DEVELOPER_KEY
YOUTUBE_APPLICATION_NAME
YOUTUBE_APPLICATION_VERSION

TWITTER_CONSUMER_KEY
TWITTER_CONSUMER_SECRET
TWITTER_ACCESS_TOKEN
TWITTER_ACCESS_TOKEN_SECRET


Deployment

This section includes instructions on creating deploying a container running Scumblr.

  • Pull this repo from Github:

git clone https://github.com/ahoernecke/docker_scumblr cd docker_scumblr

  • Build the docker image

docker build -t "scumblr" .

  • Run the container either:

docker run -p 80:80 -p 443:443 "scumblr"

  • Visit your server's dns name/ip in a browser

  • Login with the credentials you specfied (or the default if not changed: [email protected]/password)

docker_scumblr's People

Contributors

ahoernecke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docker_scumblr's Issues

Docker build issue

While building the docker I am getting following error on Ubuntu 15.10-desktop 64 version:

0 upgraded, 25 newly installed, 0 to remove and 0 not upgraded.
Need to get 2668 kB of archives.
After this operation, 11.6 MB of additional disk space will be used.
Err http://archive.ubuntu.com/ubuntu/ trusty/main libroken18-heimdal amd64 1.6git20131207+dfsg-1ubuntu1
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main libasn1-8-heimdal amd64 1.6
git20131207+dfsg-1ubuntu1
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main libkrb5support0 amd64 1.12+dfsg-2ubuntu4
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main libk5crypto3 amd64 1.12+dfsg-2ubuntu4
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main libkeyutils1 amd64 1.5.6-1
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main libkrb5-3 amd64 1.12+dfsg-2ubuntu4
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main libgssapi-krb5-2 amd64 1.12+dfsg-2ubuntu4
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main libhcrypto4-heimdal amd64 1.6git20131207+dfsg-1ubuntu1
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main libheimbase1-heimdal amd64 1.6
git20131207+dfsg-1ubuntu1
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main libwind0-heimdal amd64 1.6git20131207+dfsg-1ubuntu1
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main libhx509-5-heimdal amd64 1.6
git20131207+dfsg-1ubuntu1
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main libkrb5-26-heimdal amd64 1.6git20131207+dfsg-1ubuntu1
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main libheimntlm0-heimdal amd64 1.6
git20131207+dfsg-1ubuntu1
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main libgssapi3-heimdal amd64 1.6~git20131207+dfsg-1ubuntu1
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main libidn11 amd64 1.28-1ubuntu2
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main libsasl2-modules-db amd64 2.1.25.dfsg1-17build1
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main libsasl2-2 amd64 2.1.25.dfsg1-17build1
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main libldap-2.4-2 amd64 2.4.31-1+nmu2ubuntu8
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main librtmp0 amd64 2.4+20121230.gitdf6c518-1
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main libcurl3 amd64 7.35.0-1ubuntu2
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main openssl amd64 1.0.1f-1ubuntu2
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main ca-certificates all 20130906ubuntu2
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main krb5-locales all 1.12+dfsg-2ubuntu4
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main libsasl2-modules amd64 2.1.25.dfsg1-17build1
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main curl amd64 7.35.0-1ubuntu2
Could not resolve 'archive.ubuntu.com'
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/h/heimdal/libroken18-heimdal_1.6~git20131207+dfsg-1ubuntu1_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/h/heimdal/libasn1-8-heimdal_1.6~git20131207+dfsg-1ubuntu1_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/k/krb5/libkrb5support0_1.12+dfsg-2ubuntu4_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/k/krb5/libk5crypto3_1.12+dfsg-2ubuntu4_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/k/keyutils/libkeyutils1_1.5.6-1_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/k/krb5/libkrb5-3_1.12+dfsg-2ubuntu4_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/k/krb5/libgssapi-krb5-2_1.12+dfsg-2ubuntu4_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/h/heimdal/libhcrypto4-heimdal_1.6~git20131207+dfsg-1ubuntu1_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/h/heimdal/libheimbase1-heimdal_1.6~git20131207+dfsg-1ubuntu1_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/h/heimdal/libwind0-heimdal_1.6~git20131207+dfsg-1ubuntu1_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/h/heimdal/libhx509-5-heimdal_1.6~git20131207+dfsg-1ubuntu1_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/h/heimdal/libkrb5-26-heimdal_1.6~git20131207+dfsg-1ubuntu1_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/h/heimdal/libheimntlm0-heimdal_1.6~git20131207+dfsg-1ubuntu1_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/h/heimdal/libgssapi3-heimdal_1.6~git20131207+dfsg-1ubuntu1_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libi/libidn/libidn11_1.28-1ubuntu2_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/c/cyrus-sasl2/libsasl2-modules-db_2.1.25.dfsg1-17build1_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/c/cyrus-sasl2/libsasl2-2_2.1.25.dfsg1-17build1_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/o/openldap/libldap-2.4-2_2.4.31-1+nmu2ubuntu8_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/r/rtmpdump/librtmp0_2.4+20121230.gitdf6c518-1_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/c/curl/libcurl3_7.35.0-1ubuntu2_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_1.0.1f-1ubuntu2_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/c/ca-certificates/ca-certificates_20130906ubuntu2_all.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/k/krb5/krb5-locales_1.12+dfsg-2ubuntu4_all.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/c/cyrus-sasl2/libsasl2-modules_2.1.25.dfsg1-17build1_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/c/curl/curl_7.35.0-1ubuntu2_amd64.deb Could not resolve 'archive.ubuntu.com'

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
INFO[0081] The command [/bin/sh -c apt-get install -qy curl] returned a non-zero code: 100

improve usability

This container was a great start, but I ran into a few roadblocks that I ended up addressing in what is sort of a fork, here: https://github.com/bprodoehl/docker-scumblr

Enough is different that I started it as a new repo, but I'd love to get some feedback.

Major changes:

  • Move to Phusion Passenger as the base container
  • Embed Sketchy
  • Add environment variables for user, password, and database configuration
  • Make it easy to use a linked MySQL container (and address the UTF8 charset issue)

I get Sketchy without Scumblr, but I don't really get Scumblr without Sketchy, so keeping them separate didn't seem worth the extra configuration steps for the user to me. Anyways, if any of this seems worthwhile, I can pull some of these changes to a proper fork and start issuing pull requests.

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.