Permalink
Browse files

Initial commit of CBU code into a private repo.

  • Loading branch information...
0 parents commit ce4e0b74d44f15915c2e5ac81e5bab91f12fe44e @zzolo zzolo committed Jun 21, 2011
Showing 479 changed files with 69,689 additions and 0 deletions.
@@ -0,0 +1,55 @@
+-------------------------------------------------
+Pre-requisites
+-------------------------------------------------
+Services and applications:
+ mysql
+ monit
+ pcre
+ fcgi
+ lighttpd
+ memcached
+ beanstalkd
+
+Python packages:
+ These can be installed with pip/easy_install or other means:
+ flup
+ python-memcached
+ simplejson
+ python-yaml
+ python-mysqld OR MySQL-python
+ PIL
+ oauth2
+
+ # Make sure that boto is the latest version. If on ubuntu ensure that you're not
+ # using the system boto, which is outdated. Remove the apt-installed boto,
+ # and install from pip
+ boto # necessary for AWS / SES / S3
+
+ python-dateutil # necessary for digest_emaile.py
+
+Mysql setup for the first time:
+ mysql -u root -p
+ > create database gam2; grant all on gam2.* to gam@localhost identified by 'gam';
+ > exit
+ mysql -u root -p gam2 < trunk/sql/models.sql
+ mysql -u root -p gam2 < trunk/sql/locations.sql
+ mysql -u root -p gam2 < trunk/sql/data.sql
+
+
+-------------------------------------------------
+Web Server Setup
+-------------------------------------------------
+Install lighttpd:
+ [package-manager] install lighttpd
+
+Launch lighttpd:
+ # Create logs folder
+ mkdir -p trunk/logs && chmod -R a+rw trunk/logs
+ mkdir -p run # necessary for the pid file to be stored
+
+ lighttpd -D -f lighttpd.conf
+
+AWS configuration:
+ If thumbnails are being mirrored to S3, complete the info in the aws and media sections
+ of the config file accordingly. Otherwise image uploads will be saved to the local volume only.
+
@@ -0,0 +1,109 @@
+#--------------------------------------------------------------------
+#
+# This is a sample configuration file for Give A Minute / Change By Us
+# Instructions:
+# * NEVER NEVER NEVER store passwords or keys in this file. This is a EXAMPLE!!
+# * Copy this file to config.yaml on the production / deployed server
+# * In your copy, change all XXXX values to whatever you feel is correct
+# * diff, opendiff, diffmerge, windiff are your friends
+#
+#--------------------------------------------------------------------
+dev: Yes
+
+app_mode: not-beta
+app_env: dev
+
+instance: ChangeByUs-dev
+
+default_host: http://localhost:8080/
+blog_host: http://dev-nycblog.changeby.us/
+
+database:
+ dbn: mysql
+ db: gam2
+ user: gam
+ password: 'gam'
+ host: 127.0.0.1
+
+memcache:
+ address: 0.0.0.0
+ port: 11222
+
+beanstalk:
+ address: 0.0.0.0
+ port: 11238
+
+homepage:
+ is_display_leaderboard: False
+ is_display_featured_projects: True
+ num_featured_projects: 6
+ num_recent_ideas: 125
+
+email:
+ # Common configuration
+
+ # This needs to be an email address that has been validated by SES
+ # run ./ses-verify-email-address.pl -k ~/.aws/localprojects/awsCredentials -l
+ # and
+ # ./ses-verify-email-address.pl -k ~/.aws/localprojects/awsCredentials -v newaddr@localprojects.net
+ from_email: nyc@changeby.us
+ from_name: 'Change by Us NYC'
+
+ # address for non-responsive messaging, such as person-to-person emails
+ from_noreplies_email: noreplies@nyc.changeby.us
+ from_noreplies_name: 'Change by Us NYC (do not reply)'
+
+ log_file: ~/cbu.log
+ log_level: debug
+
+ # Digest email prefix is for the Digest email subject line
+ digest_subject_prefix: 'Change By Us Digest: '
+ # The email to which we should send digest messages during test/dev testing
+ # so that we don't spam live users.
+ # Used by the digest_emailer.py script, if 'dev' == Yes | True
+ digest_debug_recipients: sundar@localprojects.net
+
+ # If both SMTP and AWS_SES are enabled then the system uses AWS first, and if
+ # the aws send quota is close then we switch over to SMTP. This is handled in code
+
+ # SMTP specific configuration.
+ smtp:
+ host: smtp.gmail.com
+ port: 587
+ username: 'changebyusnyc@gmail.com'
+ password: 'XXXXXXXX'
+ # Generally TLS is necessary for gmail. So set it here
+ starttls: True
+
+ # Amazon SES
+ # TODO: merge this with the AWS root config
+ aws_ses:
+ # TODO: add the quota limit
+ access_key_id: XXXXXXXXXX
+ secret_access_key: XXXXXXXXXX
+
+twilio:
+ sid: AC2f8000ed6b6560de2f1f6b6bf962280a
+ token: XXXXXXX
+ api: 2010-04-01
+ phone: "6463928258"
+
+facebook:
+ app_id: '204545712900061'
+ #app_id: '177033235680785'
+
+twitter:
+ consumer_key: '7z7vETOzJPXZLicXieelfQ'
+ consumer_secret: 'kaIzFN21IxUPewEcgervVMefjBqMM5PwKu0bw7LKcU'
+ request_token_url: 'http://twitter.com/oauth/request_token'
+ access_token_url: 'http://twitter.com/oauth/access_token'
+ authenticate_url: 'http://twitter.com/oauth/authenticate'
+
+aws:
+ access_key_id: xxx
+ secret_access_key: xxx
+ bucket: eholda-nyc-changebyus
+
+media:
+ isS3mirror: True
+ root: http://s3.amazonaws.com/demo-nyc-changebyus/data/giveaminute/
No changes.
Oops, something went wrong.

0 comments on commit ce4e0b7

Please sign in to comment.