cleanup templates to work with new config
[discourse_docker.git] / templates / web.template.yml
index fa318e60887165168f76647ca5844082faebd97b..b179d1efbb3075a4a8945e6b4a89879818662658 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,15 @@ env:
   # this ensures we have enough heap space to handle a big pile of small reqs
   RUBY_HEAP_MIN_SLOTS: 800000
 
+  DISCOURSE_DB_SOCKET: /var/run/postgresql
+
+
 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:
@@ -36,7 +24,6 @@ run:
      contents: |
         #!/bin/bash
         exec 2>&1
-        $env
         # redis
         # postgres
         cd $home
@@ -48,7 +35,6 @@ run:
      contents: |
         #!/bin/bash
         exec 2>&1
-        $env
         # redis
         # postgres
         cd $home
@@ -70,9 +56,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
@@ -81,8 +64,8 @@ run:
         - ln -s /shared/log/rails $home/log
         - mkdir -p /shared/uploads
         - ln -s /shared/uploads $home/public/uploads
-        - chown -R discourse /shared/uploads
-        - chown -R discourse /shared/log/rails
+        - chown -R discourse:www-data /shared/uploads
+        - chown -R discourse:www-data /shared/log/rails
   - exec:
       cmd:
         - "cp $home/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf"
@@ -105,7 +88,9 @@ run:
       from: /server_name.+$/
       to: server_name _ ;
 
-  - merge: $home/config/database.yml $database_yml
+  - exec:
+      cmd: echo "done configuring web"
+      hook: web_config
 
   - exec:
       cd: $home