Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Commit

Permalink
Full repository switchover for app deployment.
Browse files Browse the repository at this point in the history
  • Loading branch information
knowtheory committed Dec 8, 2011
1 parent 80e6e90 commit bbf061c
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 21 deletions.
2 changes: 1 addition & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ touch on EC2 in here.
chmod 0600 .ssh/id_dsa

* Checkout DocumentCloud:
git clone git@github.com:documentcloud/document-cloud.git ~/document-cloud
git clone git@github.com:documentcloud/documentcloud.git ~/documentcloud

* Checkout Pixel Ping:
git clone git@github.com:documentcloud/pixel-ping.git ~/pixel-ping
Expand Down
3 changes: 0 additions & 3 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ The annotated source code to DocumentCloud is available here:

[TBD]

WARNING: This repository will be moving shortly to:
http://github.com/documentcloud/document-cloud

If you find a security issue while browsing the source, please email
support@documentcloud.org to inform us of the problem.

Expand Down
4 changes: 2 additions & 2 deletions config/server/nginx/documentcloud-development.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ server {
server {
listen 443;
ssl on;
ssl_certificate /Users/jashkenas/Desktop/document_cloud/document-cloud/secrets/keys/ssl/devdcloud.crt;
ssl_certificate_key /Users/jashkenas/Desktop/document_cloud/document-cloud/secrets/keys/ssl/devdcloud.key;
ssl_certificate /Users/jashkenas/Desktop/document_cloud/documentcloud/secrets/keys/ssl/devdcloud.crt;
ssl_certificate_key /Users/jashkenas/Desktop/document_cloud/documentcloud/secrets/keys/ssl/devdcloud.key;

include documentcloud.conf;
}
2 changes: 1 addition & 1 deletion config/server/nginx/documentcloud.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
server_name www.documentcloud.org;
root /home/ubuntu/document-cloud/public;
root /home/ubuntu/documentcloud/public;
passenger_enabled on;
rails_env production;

Expand Down
4 changes: 2 additions & 2 deletions config/server/nginx/production.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ server {
server {
listen 443;
ssl on;
ssl_certificate /home/ubuntu/document-cloud/secrets/keys/ssl/ssl_combined.crt;
ssl_certificate_key /home/ubuntu/document-cloud/secrets/keys/ssl/ssl.key;
ssl_certificate /home/ubuntu/documentcloud/secrets/keys/ssl/ssl_combined.crt;
ssl_certificate_key /home/ubuntu/documentcloud/secrets/keys/ssl/ssl.key;

if ($host = 'documentcloud.org') {
rewrite ^/(.*)$ https://www.documentcloud.org/$1 permanent;
Expand Down
2 changes: 1 addition & 1 deletion config/server/nginx/staging.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
server {
listen 80;
server_name staging.dcloud.org;
root /web/document-cloud/public;
root /web/documentcloud/public;
passenger_enabled on;
rails_env staging;

Expand Down
6 changes: 3 additions & 3 deletions config/server/scripts/config_from_scratch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ grep -q github .ssh/known_hosts 2>/dev/null || ssh-keyscan -t rsa github.com > .
# [copy over the secrets directory].

chown -R $USERNAME .
test -e document-cloud || sudo -u $USERNAME git clone git@github.com:documentcloud/document-cloud.git document-cloud
cd /home/$USERNAME/document-cloud
test -e documentcloud || sudo -u $USERNAME git clone git@github.com:documentcloud/documentcloud.git documentcloud
cd /home/$USERNAME/documentcloud
cp config/server/gitconfig.conf .gitconfig
rake gems:install

Expand Down Expand Up @@ -97,7 +97,7 @@ sudo -u postgres createuser -s ubuntu
sudo -u postgres createuser -s documentcloud
sudo -u postgres psql -c "alter user documentcloud password 'YOUR_DB_PASSWORD_GOES_HERE' "
sudo -u postgres createdb dcloud_$RAILS_ENVIRONMENT
cd /home/$USERNAME/document-cloud
cd /home/$USERNAME/documentcloud
sudo -u postgres psql -f db/development_structure.sql dcloud_$RAILS_ENVIRONMENT 2>&1|grep ERROR
# rake $RAILS_ENVIRONMENT db:migrate

Expand Down
2 changes: 1 addition & 1 deletion config/server/scripts/launch_cloud_crowd_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export DEBIAN_FRONTEND=noninteractive

USERNAME=ubuntu

cd /home/$USERNAME/document-cloud
cd /home/$USERNAME/documentcloud
su $USERNAME -c "rake production crowd:node:start"
2 changes: 1 addition & 1 deletion config/server/scripts/update_preconfigured_instance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export DEBIAN_FRONTEND=noninteractive
USERNAME=ubuntu

chown -R $USERNAME /home/$USERNAME
cd /home/$USERNAME/document-cloud
cd /home/$USERNAME/documentcloud
sudo -u $USERNAME git pull
rake gems:install
chown -R $USERNAME /home/$USERNAME
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/aws.rake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

namespace :aws do

desc "Launch a new unconfigured EC2 instance and configure it for document-cloud"
desc "Launch a new unconfigured EC2 instance and configure it for documentcloud"
task :new_instance_from_scratch, :instance_type, :needs => :environment do |t,args|
DC::AWS.new.boot_instance({
:type => args.instance_type,
Expand Down
6 changes: 3 additions & 3 deletions lib/tasks/build.rake
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ namespace :build do
FileUtils.cp_r('public/images', 'build/images')

# Export back to DocumentCloud
FileUtils.cp_r('build/images', '../document-cloud/public/viewer')
FileUtils.cp_r('build/images', '../documentcloud/public/viewer')
`cat build/viewer.js build/templates.js > build/viewer_new.js`
FileUtils.rm_r(['build/viewer.js', 'build/templates.js'])
FileUtils.mv 'build/viewer_new.js', 'build/viewer.js'
FileUtils.cp 'build/print.css', "../document-cloud/public/viewer/printviewer.css"
FileUtils.cp 'build/print.css', "../documentcloud/public/viewer/printviewer.css"
Dir['build/viewer*'].each do |asset|
FileUtils.cp(asset, "../document-cloud/public/viewer/#{File.basename(asset)}")
FileUtils.cp(asset, "../documentcloud/public/viewer/#{File.basename(asset)}")
end
FileUtils.rm_r('build') if File.exists?('build')

Expand Down
4 changes: 2 additions & 2 deletions lib/tasks/remote.rake
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ end

def configuration
case RAILS_ENV
when 'staging' then {:user => 'root', :dir => '/web/document-cloud', :key => 'secrets/keys/staging.pem'}
when 'production' then {:user => 'ubuntu', :dir => '~/document-cloud', :key => 'secrets/keys/documentcloud.pem'}
when 'staging' then {:user => 'root', :dir => '/web/documentcloud', :key => 'secrets/keys/staging.pem'}
when 'production' then {:user => 'ubuntu', :dir => '~/documentcloud', :key => 'secrets/keys/documentcloud.pem'}
end
end

Expand Down

0 comments on commit bbf061c

Please sign in to comment.