2 # Comma delimited list of emails, required if you want admin access for first account
3 DEVELOPER_EMAILS: 'YOUR_EMAIL@EMAIL.COM1'
4 # You can have redis on a different box
5 # REDIS_PROVIDER_URL: 'redis://l.discourse:6379'
6 RAILS_ENV: 'production'
8 # slightly less aggressive than "recommendation" but works fine with oobgc
9 RUBY_GC_MALLOC_LIMIT: 40000000
10 # this ensures we have enough heap space to handle a big pile of small reqs
11 RUBY_HEAP_MIN_SLOTS: 800000
14 # SSH key is required for remote access into the container
17 home: /var/www/discourse
19 # You can connect to any DB you wish to
24 socket: /var/run/postgresql
33 path: /etc/service/unicorn/run
42 exec sudo -E -u discourse LD_PRELOAD=/usr/lib/libjemalloc.so.1 bundle exec config/unicorn_launcher -E production -c config/unicorn.conf.rb
45 path: /etc/service/sidekiq/run
54 exec sudo -E -u discourse LD_PRELOAD=/usr/lib/libjemalloc.so.1 bundle exec sidekiq
57 path: /etc/service/nginx/run
71 - git checkout $version
72 - cp config/database.yml.production-sample config/database.yml
73 - cp config/redis.yml.sample config/redis.yml
74 - cp config/environments/production.rb.sample config/environments/production.rb
76 - mkdir -p tmp/sockets
78 - mkdir -p /shared/log/rails
80 - ln -s /shared/log/rails $home/log
81 - mkdir -p /shared/uploads
82 - ln -s /shared/uploads $home/public/uploads
83 - chown -R discourse /shared/uploads
84 - chown -R discourse /shared/log/rails
87 - "cp $home/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf"
88 - "rm /etc/nginx/sites-enabled/default"
91 filename: /etc/nginx/nginx.conf
92 from: pid /run/nginx.pid;
96 filename: "/etc/nginx/conf.d/discourse.conf"
97 from: /upstream[^\}]+\}/m
98 to: "upstream discourse {
99 server 127.0.0.1:3000;
103 filename: "/etc/nginx/conf.d/discourse.conf"
104 from: /server_name.+$/
107 - merge: $home/config/database.yml $database_yml
112 - chown -R discourse $home
113 - sudo -E -u discourse bundle install --deployment --verbose --without test --without development
114 - sudo -E -u discourse bundle exec rake db:migrate
115 - sudo -E -u discourse bundle exec rake assets:precompile