diff --git a/.travis.yml b/.travis.yml index e35fae47..ab1a0472 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ before_install: - sudo apt-get update - sudo apt-get install g++ qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x before_script: - - psql -c 'create database "arcdata-test";' -U postgres + - psql -c 'create database "dcsops-test";' -U postgres - bundle exec rake bootstrap:db_config db:test:prepare script: xvfb-run bundle exec rspec spec env: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7cf37875..67270d64 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ Please note that we expect all participants to abide by the project ## Submitting and Reviewing Code The DCSOps home repository is -[GitHub](https://github.com/redcross/arcdata). Please submit [pull +[GitHub](https://github.com/redcross/dcsops). Please submit [pull requests](https://help.github.com/articles/about-pull-requests/) (PRs) there. @@ -149,7 +149,7 @@ In order to make sure the two are in line, you can add the heroku branch to your git checkout (after running `heroku login`) ``` -$ git remote add heroku-production https://git.heroku.com/arcdata.git +$ git remote add heroku-production https://git.heroku.com/dcsops.git $ git fetch heroku-production ``` @@ -162,7 +162,7 @@ This branch is synced up with the current deployed staging heroku branch. As above, to make sure the two are aligned, you can do: ``` -$ git remote add heroku-staging https://git.heroku.com/arcdata-staging.git +$ git remote add heroku-staging https://git.heroku.com/dcsops-staging.git $ git fetch heroku-staging ``` @@ -275,7 +275,7 @@ without raising it for discussion. ## For more project management information, see the wiki. See the [DCSOps Development -Wiki](https://github.com/redcross/arcdata/wiki) for more information +Wiki](https://github.com/redcross/dcsops/wiki) for more information about how we run the project, records of meetings and decisions, etc. ## Thank you! diff --git a/Gemfile b/Gemfile index e68f5f2b..ea686674 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' ruby "2.6.6" -#ruby-gemset=arcdata +#ruby-gemset=dcsops # The following are from the default generated Gemfile for a new Rails 5.2 app: diff --git a/INSTALL.md b/INSTALL.md index 23f7a301..d3e1a367 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -106,7 +106,7 @@ $ rake ## Deployment -There are two branches for deployment 'production' and 'candidate-production'. The former is for the arcdata app on heroku, and the latter is for the arcdata-staging app. Generally, 'production' and 'main' are in step, but there's times when main is more in step with 'candidate-production.' +There are two branches for deployment 'production' and 'candidate-production'. The former is for the dcsops app on heroku, and the latter is for the dcsops-staging app. Generally, 'production' and 'main' are in step, but there's times when main is more in step with 'candidate-production.' DCSOps is deployed on Heroku, so you'll need a Heroku account and collaborator access granted to do anything with the production instance. @@ -119,7 +119,7 @@ $ brew install heroku/brew/heroku To interact with the app from the command line, set up git remote to it: ```bash -$ heroku git:remote --app arcdata # or arcdata-staging for staging +$ heroku git:remote --app dcsops # or dcsops-staging for staging ``` At this point, you will want to rename the heroku remote to something more descriptive, so that you can have a staging and production remote in your local git instance. @@ -133,7 +133,7 @@ Then you can push to it. Database migrations are not run automatically, so don't ```bash $ git push heroku-production production:main $ # Or git push heroku-staging candidate-production:main -$ heroku run rake db:migrate --app arcadata # Or --app arcdata-staging +$ heroku run rake db:migrate --app arcadata # Or --app dcsops-staging ``` **IMPORTANT:** Once you have finished a new deployment, please log it in `site-updates.txt`. @@ -200,7 +200,7 @@ Direct Line is a call center service used by some of the regions in DCSOps. It s ## Staging Site Setup -We have a staging instance setup at `arcdata-staging` for testing out updates before they're pushed into production. It uses a different database (pulled from production backups), doesn't send emails or text messages, and doesn't contact any external services where changes are made including SQS for the Volunteer Connection import or S3. Delayed job tasks are run every hour until they are completed with `rake jobs:workoff` on a Heroku Scheduler dyno. +We have a staging instance setup at `dcsops-staging` for testing out updates before they're pushed into production. It uses a different database (pulled from production backups), doesn't send emails or text messages, and doesn't contact any external services where changes are made including SQS for the Volunteer Connection import or S3. Delayed job tasks are run every hour until they are completed with `rake jobs:workoff` on a Heroku Scheduler dyno. In order to update the staging database with a more recent copy of the production database, we have a rake task that downloads a production backup, loads it into a local temporary database, removes unneeded records (to reduce the size of the staging DB), and replaces the Heroku staging database with the modified local data. It can be run with: @@ -208,7 +208,7 @@ In order to update the staging database with a more recent copy of the productio $ rake staging:update_staging_db ``` -**Note**: Downloading the production backup and pushing the local data to staging can take some time, but user input is required to confirm the overwriting of the `arcdata-staging` database. This is left in as an extra precaution against accidentally deleting production data. +**Note**: Downloading the production backup and pushing the local data to staging can take some time, but user input is required to confirm the overwriting of the `dcsops-staging` database. This is left in as an extra precaution against accidentally deleting production data. ## Database Management @@ -217,19 +217,19 @@ Heroku Postgres is being used for the PostgreSQL database, so backups and creden We run daily automated backups on Heroku. To schedule automated backups and verify that they are running, you can run the following commands, specifying a 24-hour time and time zone for backups to take be created (with more detail in the [documentation](https://devcenter.heroku.com/articles/heroku-postgres-backups#scheduling-backups)): ```bash -$ heroku pg:backups:schedule DATABASE_URL --at '02:00 America/Chicago' --app arcdata -$ heroku pg:backups --app arcdata +$ heroku pg:backups:schedule DATABASE_URL --at '02:00 America/Chicago' --app dcsops +$ heroku pg:backups --app dcsops ``` To create and then download a backup manually, you'll need to run: ```bash -$ heroku pg:backups:capture --app arcdata -$ heroku pg:backups:download --app arcdata +$ heroku pg:backups:capture --app dcsops +$ heroku pg:backups:download --app dcsops ``` Credentials are also managed through the CLI rather than directly through Postgres itself. You can specify usernames for new database credentials, but passwords are always automatically created by Heroku. Databases running earlier versions of Postgres (~9.3) don't support the [full set of commands and functionality](https://devcenter.heroku.com/articles/heroku-postgresql-credentials), but you can reset the database credentials with: ```bash -$ heroku pg:credentials --reset --app arcdata +$ heroku pg:credentials --reset --app dcsops ``` diff --git a/README.md b/README.md index 558c64eb..8131fc10 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # DCSOps ("Disaster Cycle Services Operations") -Current build status: [![Build Status](https://travis-ci.org/redcross/arcdata.svg?branch=main)](https://travis-ci.org/redcross/arcdata) [![Coverage Status](https://coveralls.io/repos/github/redcross/arcdata/badge.svg?branch=main)](https://coveralls.io/github/redcross/arcdata?branch=main) +Current build status: [![Build Status](https://travis-ci.org/redcross/dcsops.svg?branch=main)](https://travis-ci.org/redcross/dcsops) [![Coverage Status](https://coveralls.io/repos/github/redcross/dcsops/badge.svg?branch=main)](https://coveralls.io/github/redcross/dcsops?branch=main) -DCSOps (a.k.a. ARCData) is an open source application for managing some Red Cross Disaster Services processes, such as Disaster Action Team (DAT) shifts. The production instance is at [DCSOps.org](https://dcsops.org/). +DCSOps is an open source application for managing some Red Cross Disaster Services processes, such as Disaster Action Team (DAT) shifts. The production instance is at [DCSOps.org](https://dcsops.org/). ## Installation @@ -14,7 +14,7 @@ You can communicate with the other developers by posting to the [DCSOps discussion forum](https://groups.google.com/forum/#!forum/dcsops-dev) (which is a Google Group), or by filing / commenting in the [issue -tracker](https://github.com/redcross/arcdata/issues). Both of these +tracker](https://github.com/redcross/dcsops/issues). Both of these forums are browseable without logging in, but you'll need to have, respectively, a Google or GitHub account to post. Creating an account is free of charge. diff --git a/config/database.yml.example b/config/database.yml.example index 802b7996..499cb145 100644 --- a/config/database.yml.example +++ b/config/database.yml.example @@ -1,6 +1,6 @@ development: adapter: postgresql - database: arcdata-dev + database: dcsops-dev username: postgres pool: 5 timeout: 5000 @@ -10,6 +10,6 @@ development: # Do not set this db to the same as development or production. test: adapter: postgresql - database: arcdata-test + database: dcsops-test pool: 5 timeout: 5000 diff --git a/lib/tasks/staging.rake b/lib/tasks/staging.rake index 436aab95..1e77cab1 100644 --- a/lib/tasks/staging.rake +++ b/lib/tasks/staging.rake @@ -1,12 +1,12 @@ namespace :staging do TEMP_DB_NAME = "temp_staging_db" - STAGING_APP = "arcdata-staging" + STAGING_APP = "dcsops-staging" task :copy_prod_db => :environment do puts "Downloading prod database backup" `dropdb --if-exists #{TEMP_DB_NAME}` `createdb -O #{ActiveRecord::Base.connection_config[:username]} #{TEMP_DB_NAME}` - `heroku pg:backups:download -a arcdata` + `heroku pg:backups:download -a dcsops` puts "Loading prod database backup into local temp database" `pg_restore -U #{ActiveRecord::Base.connection_config[:username]} -O -d #{TEMP_DB_NAME} latest.dump` `rm latest.dump` diff --git a/log/.keep b/log/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/public/500.html b/public/500.html index ad9fedfc..4eceb2f9 100644 --- a/public/500.html +++ b/public/500.html @@ -9,7 +9,7 @@ DCSOps - Oh No! (500) -