amend config to work nicely with new zero sample files policy
authorSam Saffron <sam.saffron@gmail.com>
Wed, 18 Dec 2013 06:22:31 +0000 (22:22 -0800)
committerSam Saffron <sam.saffron@gmail.com>
Wed, 18 Dec 2013 06:22:31 +0000 (22:22 -0800)
samples/standalone.yml
samples/web_only.yml
templates/web.template.yml

index 34ef3e6c05e1150f95be9bf3f0dc60e2c632aacf..f3eda22b25f6c4222073dceaa7e238044f1247e6 100644 (file)
@@ -11,23 +11,20 @@ expose:
   - "2222:22"
 
 params:
-  # ssh key so you can log in
+  # ssh key so you can log in, a tip, try using the key for root in ~root/.ssh or generate one
+  # using ssh-keygen
   ssh_key: YOUR_SSH_KEY
   # git revision to run
   version: HEAD
 
 
-  # host name, required by Discourse
-  database_yml:
-    production:
-      host_names:
-        # your domain name
-        - www.example.com
-
-
-# needed for bootstrapping, lowercase email
 env:
+  # your email here
   DEVELOPER_EMAILS: 'my_email@email.com'
+  # CHANGE ME to your hostname
+  DISCOURSE_HOSTNAME: 'www.example.com'
+  # SET ME to your smtp server eg mandrill
+  # SMTP_URL: 'smtp://user@example.com:password@smtp.mandrillapp.com:587'
 
 volumes:
   - volume:
index 5882a1722e4c3499baa720d3836fa4661f60c3d4..e4965a3123cad96e189c65ae73696839156e79b2 100644 (file)
@@ -15,19 +15,17 @@ params:
   ssh_key: ""
   version: HEAD
 
-  database_yml:
-    production:
-      socket: ""
-      host: <%= ENV['DOCKER_HOST_IP'] %>
-      database: discourse
-      username: discourse
-      password: SOME_SECRET
-      host_names:
-        - www.SOME_DOMAIN.com
-
 # developer emails allow you to fast track account creation on the site
 env:
+  # add emails here
   DEVELOPER_EMAILS: ''
+  POSTGRES_SOCKET: ''
+  POSTGRES_URL: pg://discourse:SOME_SECRET@YOUR_IP_ADDRESS
+  POSTGRES_DB: discourse
+  DISCOURSE_HOSTNAME: 'www.example.com'
+  REDIS_ADDRESS: YOUR_IP_ADDRESS
+  # don't forget to set mail
+  # SMTP_URL: 'smtp://user@example.com:password@smtp.mandrillapp.com:587'
 
 volumes:
   - volume:
@@ -41,33 +39,8 @@ hooks:
 #after_sshd:
 #    - exec: ssh-import-id some-user
   after_code:
-    - file:
-        path: $home/config/redis.yml
-        contents: |
-          production:
-            host: <%= ENV['DOCKER_HOST_IP'] %>
-            port: 6379
-            db: 0
-            cache_db: 2
     - exec:
         cd: $home/plugins
         cmd:
           - mkdir -p plugins
           - git clone https://github.com/discourse/docker_manager.git
-# mail is critical, setup here
-    # - replace:
-    #     filename: /var/www/discourse/config/environments/production.rb
-    #     from: /end/
-    #     direction: reverse
-    #     to: |
-    #       config.action_mailer.delivery_method = :smtp
-    #       config.action_mailer.smtp_settings = {
-    #         :address              => 'smtp.mandrillapp.com',
-    #         :port                 => 587,
-    #         :domain               => 'domain',
-    #         :user_name            => 'user@email.com',
-    #         :password             => 'pwd',
-    #         :authentication       => 'login',
-    #         :enable_starttls_auto => true
-    #       }
-    #       end
index bfa6a90def115b8f2a6690245c26871670cf25b0..53ee7eb1702af0220ba85e6a8903482f36d51ba2 100644 (file)
@@ -1,8 +1,5 @@
 env:
-  # Comma delimited list of emails, required if you want admin access for first account
-  DEVELOPER_EMAILS: 'YOUR_EMAIL@EMAIL.COM1'
   # You can have redis on a different box
-  # REDIS_PROVIDER_URL: 'redis://l.discourse:6379'
   RAILS_ENV: 'production'
   UNICORN_WORKERS: 3
   # slightly less aggressive than "recommendation" but works fine with oobgc
@@ -10,24 +7,17 @@ env:
   # this ensures we have enough heap space to handle a big pile of small reqs
   RUBY_HEAP_MIN_SLOTS: 800000
 
+  POSTGRES_SOCKET: /var/run/postgresql
+  POSTGRES_URL: pg://discourse@localhost
+  POSTGRES_DB: discourse
+
+
 params:
   # SSH key is required for remote access into the container
   version: HEAD
 
   home: /var/www/discourse
 
-  # You can connect to any DB you wish to
-  database_yml:
-    production:
-      database: discourse
-      username: discourse
-      socket: /var/run/postgresql
-# TODO allow param here?
-      # password:
-      # host:
-      # host_names:
-      #   - YOUR_HOSTNAME_HERE
-
 run:
 
   - file:
@@ -68,9 +58,6 @@ run:
         - git clean -f
         - git pull
         - git checkout $version
-        - cp config/database.yml.production-sample config/database.yml
-        - cp config/redis.yml.sample config/redis.yml
-        - cp config/environments/production.rb.sample config/environments/production.rb
         - mkdir -p tmp/pids
         - mkdir -p tmp/sockets
         - touch tmp/.gitkeep
@@ -103,8 +90,6 @@ run:
       from: /server_name.+$/
       to: server_name _ ;
 
-  - merge: $home/config/database.yml $database_yml
-
   - exec:
       cmd: echo "done configuring web"
       hook: web_config