Skip to content
Browse files

add example .env files

  • Loading branch information...
1 parent db29331 commit 562e103548e12a207127d391e0f9706b2aa183c2 Alexander Mekelburg committed May 10, 2013
Showing with 49 additions and 5 deletions.
  1. +3 −0 .env.ENVNAME.example
  2. +17 −0 .env.example
  3. +6 −1 .gitignore
  4. +23 −4 doc/setup.md
View
3 .env.ENVNAME.example
@@ -0,0 +1,3 @@
+AIRBRAKE_API_KEY: 'Airbrake API Key'
+COOKIE_SECRET: 'Cookie verification secret'
+SECRET_TOKEN: 'Session store token'
View
17 .env.example
@@ -0,0 +1,17 @@
+DEPLOY_TO: "base-deploy-directory-on-app-server"
+SYMLINK_DATA_DIR: "base-symlink-directory-on-util-server"
+
+STAGING2_WEB: hostname
+STAGING2_APP: hostname
+STAGING2_UTIL: hostname
+STAGING2_DB: hostname
+
+STAGING_WEB: hostname
+STAGING_APP: hostname
+STAGING_UTIL: hostname
+STAGING_DB: hostname
+
+PRODUCTION_WEB: hostname
+PRODUCTION_APP: hostname
+PRODUCTION_UTIL: hostname
+PRODUCTION_DB: hostname
View
7 .gitignore
@@ -19,7 +19,12 @@
.idea
.rvmrc*
.vimrc
-.env*
+.env
+.env.staging2
+.env.staging
+.env.production
+.env.development
+.env.test
config/mobile.yml
config/states_with_online_registration.yml
config/database.yml
View
27 doc/setup.md
@@ -10,31 +10,45 @@ If the gemset changes, needs to change the config paths. Stick with @rocky4 [maj
# Development Setup Instructions
+
## 1. Create real versions of the .example files
-TODO
+
+
+### a. Ruby version management
+
+The `rocky` application is setup assuming you're using RVM. The ruby version and gemset name are stored in the `.ruby-version` and `.ruby-gemset` files which should set your RVM environment automatically. If you're using a ruby version manager other than RVM you'll need to make changes to the deploy process.
+
+
+### b. Customizing files
In the `rocky` application replace all the `*.example` files with real ones.
-These files contain sensitive data like passwords so we don't commit them to version control. You'll of course need to fill in the actual useful data in the real files.
+These files contain sensitive data like passwords so we don't commit them to version control. You'll of course need to fill in the actual useful data in the real files. See the contents of the example files for details on how they're used.
* `config/database.yml`
* `config/newrelic.yml`
* `config/initializers/cookie_verification_secret.rb`
* `db/bootstrap/partners.yml`
+ * `.env.[environment_name]` for example, .env.staging or .env.production
-These files contain configuration items that differ from environment to environment.
+These files contain configuration items that differ from environment to environment. If you don't create your own version on the server a version of these files will be created automatically in the first deploy.
* `config/states_with_online_registration.yml` - the list of states that have a separate workflow for redirection to their own online system.
* `config/app_config.yml` - general settings for app behavior (mostly email and cleanup timings)
- * `config/mobile.yml` -
+ * `config/mobile.yml` - configuration items for mobile detection behavior
## 2. Configure deploy scripts
+The `rocky` application is set up to be deployed using capistrano with multistage.
+The repository contains the generic `config/deploy.rb` file with the main set of procedures for a deployment and there are a number of environment-specific files in `config/deploy/`. These files just contain a few settings which reference environment variables. These variables need to be set in your .env file (which only needs to exist on your development machine, or wherever you run your cap scripts from). See .env.example for a list of what values need to be specified.
+
* The plain .env file should just go on a workstation. It sits at the
root of project along with .gitignore, app/, config/ etc.
+
+
## 3. Configure servers
* ssh config for github
@@ -43,6 +57,11 @@ root of project along with .gitignore, app/, config/ etc.
## 4. Deploy
+### a. Setup (rvm/passenger)
+
+### b. Deploy (various symlinks)
+
+
* how to do a setup cap X deploy:setup, cap X deploy

0 comments on commit 562e103

Please sign in to comment.
Something went wrong with that request. Please try again.