DEV: Drop unused cloud66 configuration files (#26409)
Why this change? These files were added 10 years ago and are no longer maintained or relevant. Please see https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md instead.
This commit is contained in:
parent
3b40341e83
commit
9d94cee898
|
@ -1,224 +0,0 @@
|
|||
production:
|
||||
first_thing:
|
||||
# 1. Permissions on postgres box
|
||||
- source: /config/cloud/cloud66/scripts/permissions.sh
|
||||
destination: /tmp/scripts/permissions.sh
|
||||
target: postgresql
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
sudo: true
|
||||
after_postgresql:
|
||||
# 2. Copy SQL image to PSQL server
|
||||
- source: /pg_dumps/production-image.sql
|
||||
destination: /tmp/images/production-image.sql
|
||||
target: postgresql
|
||||
apply_during: build_only
|
||||
owner: postgres
|
||||
after_checkout:
|
||||
# 3. Copy Procfile
|
||||
- source: /config/cloud/cloud66/files/Procfile
|
||||
destination: <%= ENV['RAILS_STACK_PATH'] %>/Procfile
|
||||
target: rails
|
||||
run_on: all_servers
|
||||
# 5. Copy production.rb file
|
||||
- source: /config/cloud/cloud66/files/production.rb
|
||||
destination: <%= ENV['RAILS_STACK_PATH'] %>/config/environments/production.rb
|
||||
target: rails
|
||||
run_on: all_servers
|
||||
# 6. Move thin config to server
|
||||
- source: /config/cloud/cloud66/files/thin.yml
|
||||
destination: <%= ENV['RAILS_STACK_PATH'] %>/config/thin.yml
|
||||
target: rails
|
||||
run_on: all_servers
|
||||
after_rails:
|
||||
# 7. Set environment variables and allow PSQL user to access them
|
||||
- source: /config/cloud/cloud66/scripts/env_vars.sh
|
||||
destination: /tmp/scripts/env_vars.sh
|
||||
target: rails
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
sudo: true
|
||||
last_thing:
|
||||
# 8. KILL DB
|
||||
- source: /config/cloud/cloud66/scripts/kill_db.sh
|
||||
destination: /tmp/scripts/kill_db.sh
|
||||
target: postgresql
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
sudo: true
|
||||
# 9. DB:DROP & DB:CREATE
|
||||
- source: /config/cloud/cloud66/scripts/drop_create.sh
|
||||
destination: /tmp/scripts/drop_create.sh
|
||||
target: rails
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
sudo: true
|
||||
# 10. Import database image
|
||||
- source: /config/cloud/cloud66/scripts/import_prod.sh
|
||||
destination: /tmp/scripts/import_prod.sh
|
||||
target: postgresql
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
owner: postgres
|
||||
run_as: postgres
|
||||
# 11. Migrate database
|
||||
- source: /config/cloud/cloud66/scripts/migrate.sh
|
||||
destination: /tmp/migrate.sh
|
||||
target: rails
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
sudo: true
|
||||
# 12. Curl script
|
||||
- source: /config/cloud/cloud66/scripts/curl.sh
|
||||
destination: /tmp/curl.sh
|
||||
target: rails
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
sudo: true
|
||||
staging:
|
||||
first_thing:
|
||||
# 1. Permissions on postgres box
|
||||
- source: /config/cloud/cloud66/scripts/permissions.sh
|
||||
destination: /tmp/scripts/permissions.sh
|
||||
target: postgresql
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
sudo: true
|
||||
after_postgresql:
|
||||
# 2. Copy SQL image to PSQL server
|
||||
- source: /pg_dumps/production-image.sql
|
||||
destination: /tmp/images/production-image.sql
|
||||
target: postgresql
|
||||
apply_during: build_only
|
||||
owner: postgres
|
||||
after_checkout:
|
||||
# 3. Copy Procfile
|
||||
- source: /config/cloud/cloud66/files/Procfile
|
||||
destination: <%= ENV['RAILS_STACK_PATH'] %>/Procfile
|
||||
target: rails
|
||||
run_on: all_servers
|
||||
# 5. Rename production.rb.sample file
|
||||
- source: /config/cloud/cloud66/files/production.rb
|
||||
destination: <%= ENV['RAILS_STACK_PATH'] %>/config/environments/production.rb
|
||||
target: rails
|
||||
run_on: all_servers
|
||||
# 6. Move thin config to server
|
||||
- source: /config/cloud/cloud66/files/thin.yml
|
||||
destination: <%= ENV['RAILS_STACK_PATH'] %>/config/thin.yml
|
||||
target: rails
|
||||
run_on: all_servers
|
||||
after_rails:
|
||||
# 7. Set environment variables and allow PSQL user to access them
|
||||
- source: /config/cloud/cloud66/scripts/env_vars.sh
|
||||
destination: /tmp/scripts/env_vars.sh
|
||||
target: rails
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
sudo: true
|
||||
last_thing:
|
||||
# 8. KILL DB
|
||||
- source: /config/cloud/cloud66/scripts/kill_db.sh
|
||||
destination: /tmp/scripts/kill_db.sh
|
||||
target: postgresql
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
sudo: true
|
||||
# 9. DB:DROP & DB:CREATE
|
||||
- source: /config/cloud/cloud66/scripts/drop_create.sh
|
||||
destination: /tmp/scripts/drop_create.sh
|
||||
target: rails
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
sudo: true
|
||||
# 10. Import database image
|
||||
- source: /config/cloud/cloud66/scripts/import_prod.sh
|
||||
destination: /tmp/scripts/import_prod.sh
|
||||
target: postgresql
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
owner: postgres
|
||||
run_as: postgres
|
||||
# 11. Migrate database
|
||||
- source: /config/cloud/cloud66/scripts/migrate.sh
|
||||
destination: /tmp/migrate.sh
|
||||
target: rails
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
sudo: true
|
||||
# 12. Curl script
|
||||
- source: /config/cloud/cloud66/scripts/curl.sh
|
||||
destination: /tmp/curl.sh
|
||||
target: rails
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
sudo: true
|
||||
development:
|
||||
first_thing:
|
||||
# 1. Permissions on postgres box
|
||||
- source: /config/cloud/cloud66/scripts/permissions.sh
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
sudo: true
|
||||
after_postgresql:
|
||||
# 2. Copy SQL image to PSQL server
|
||||
- source: /pg_dumps/development-image.sql
|
||||
destination: /tmp/images/development-image.sql
|
||||
target: postgresql
|
||||
apply_during: build_only
|
||||
owner: postgres
|
||||
after_checkout:
|
||||
# 3. Copy Procfile
|
||||
- source: /config/cloud/cloud66/files/Procfile
|
||||
destination: <%= ENV['RAILS_STACK_PATH'] %>/Procfile
|
||||
target: rails
|
||||
run_on: all_servers
|
||||
# 5. Move thin config to server
|
||||
- source: /config/cloud/cloud66/files/thin.yml
|
||||
destination: <%= ENV['RAILS_STACK_PATH'] %>/config/thin.yml
|
||||
target: rails
|
||||
run_on: all_servers
|
||||
after_rails:
|
||||
# 6. Set environment variables and allow PSQL user to access them
|
||||
- source: /config/cloud/cloud66/scripts/env_vars.sh
|
||||
destination: /tmp/scripts/env_vars.sh
|
||||
target: rails
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
sudo: true
|
||||
last_thing:
|
||||
# 7. KILL DB
|
||||
- source: /config/cloud/cloud66/scripts/kill_db.sh
|
||||
destination: /tmp/scripts/kill_db.sh
|
||||
target: postgresql
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
sudo: true
|
||||
# 8. DB:DROP & DB:CREATE
|
||||
- source: /config/cloud/cloud66/scripts/drop_create.sh
|
||||
destination: /tmp/scripts/drop_create.sh
|
||||
target: rails
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
sudo: true
|
||||
# 9. Import database image
|
||||
- source: /config/cloud/cloud66/scripts/import_dev.sh
|
||||
destination: /tmp/scripts/import_dev.sh
|
||||
target: postgresql
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
owner: postgres
|
||||
run_as: postgres
|
||||
# 10. Migrate database
|
||||
- source: /config/cloud/cloud66/scripts/migrate.sh
|
||||
destination: /tmp/migrate.sh
|
||||
target: rails
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
sudo: true
|
||||
# 11. Curl script
|
||||
- source: /config/cloud/cloud66/scripts/curl.sh
|
||||
destination: /tmp/curl.sh
|
||||
target: rails
|
||||
apply_during: build_only
|
||||
execute: true
|
||||
sudo: true
|
|
@ -1,3 +0,0 @@
|
|||
web: bundle exec rails server -p $PORT
|
||||
sidekiq: bundle exec sidekiq -e $RAILS_ENV
|
||||
custom_web: bundle exec thin start -C config/thin.yml -e $RACK_ENV -d
|
|
@ -1,63 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Discourse::Application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb
|
||||
|
||||
# Code is not reloaded between requests
|
||||
config.cache_classes = true
|
||||
|
||||
# Full error reports are disabled and caching is turned on
|
||||
config.consider_all_requests_local = false
|
||||
config.action_controller.perform_caching = true
|
||||
|
||||
# Disable Rails's static asset server (Apache or nginx will already do this)
|
||||
config.serve_static_assets = false
|
||||
|
||||
# Compress JavaScripts and CSS
|
||||
config.assets.compress = true
|
||||
|
||||
# stuff should be pre-compiled
|
||||
config.assets.compile = false
|
||||
|
||||
# Generate digests for assets URLs
|
||||
config.assets.digest = true
|
||||
|
||||
# Specifies the header that your server uses for sending files
|
||||
config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for nginx
|
||||
|
||||
# you may use other configuration here for mail eg: sendgrid
|
||||
|
||||
config.action_mailer.delivery_method = :smtp
|
||||
config.action_mailer.smtp_settings = {
|
||||
address: ENV["SMTP_ADDRESS"],
|
||||
port: ENV["SMTP_PORT"],
|
||||
domain: ENV["SMTP_DOMAIN"],
|
||||
user_name: ENV["SMTP_USERNAME"],
|
||||
password: ENV["SMTP_PASSWORD"],
|
||||
authentication: "plain",
|
||||
enable_starttls_auto: true,
|
||||
}
|
||||
|
||||
#config.action_mailer.delivery_method = :sendmail
|
||||
#config.action_mailer.sendmail_settings = {arguments: '-i'}
|
||||
|
||||
# Send deprecation notices to registered listeners
|
||||
config.active_support.deprecation = :notify
|
||||
|
||||
# this setting enables rack_cache so it caches various requests in redis
|
||||
config.enable_rack_cache = true
|
||||
|
||||
# allows developers to use mini profiler
|
||||
config.load_mini_profiler = true
|
||||
|
||||
# allows Cross-origin resource sharing (CORS) for API access in JavaScript (default to false for security).
|
||||
# See the initializer and https://github.com/cyu/rack-cors for configuration documentation.
|
||||
#
|
||||
# config.enable_rack_cors = false
|
||||
# config.rack_cors_origins = ['*']
|
||||
# config.rack_cors_resource = ['*', { :headers => :any, :methods => [:get, :post, :options] }]
|
||||
|
||||
# Discourse strongly recommend you use a CDN.
|
||||
# For origin pull cdns all you need to do is register an account and configure
|
||||
# config.action_controller.asset_host = "http://YOUR_CDN_HERE"
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
address: localhost
|
||||
port: 3000
|
||||
timeout: 30
|
||||
pid: /tmp/web_server.pid
|
||||
socket: /tmp/web_server.sock
|
||||
max_conns: 1024
|
||||
max_persistent_conns: 100
|
||||
require: []
|
||||
wait: 30
|
||||
daemonize: true
|
||||
chdir: $STACK_PATH
|
||||
environment: $RAILS_ENV
|
||||
log: $STACK_PATH/log/thin.log
|
|
@ -1,19 +0,0 @@
|
|||
production:
|
||||
rails:
|
||||
server:
|
||||
unique_name: frontend
|
||||
configuration:
|
||||
ignore_missing_schema: true
|
||||
staging:
|
||||
rails:
|
||||
server:
|
||||
unique_name: frontend
|
||||
configuration:
|
||||
ignore_missing_schema: true
|
||||
development:
|
||||
rails:
|
||||
server:
|
||||
unique_name: frontend
|
||||
configuration:
|
||||
use_asset_pipeline: false
|
||||
ignore_missing_schema: true
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/bash
|
||||
FILE=/tmp/curl_done
|
||||
|
||||
if [ -f $FILE ]
|
||||
then
|
||||
echo "File $FILE exists..."
|
||||
else
|
||||
curl --retry 5 localhost
|
||||
touch /tmp/curl_done
|
||||
fi
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/bash
|
||||
FILE=/tmp/drop_create_done
|
||||
|
||||
if [ -f $FILE ]
|
||||
then
|
||||
echo "File $FILE exists..."
|
||||
else
|
||||
cd $RAILS_STACK_PATH
|
||||
bundle exec rake db:drop db:create
|
||||
touch /tmp/drop_create_done
|
||||
fi
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/bash
|
||||
source /var/.cloud66_env
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/bash
|
||||
FILE=/tmp/import_dev_done
|
||||
|
||||
if [ -f $FILE ]
|
||||
then
|
||||
echo "File $FILE exists..."
|
||||
else
|
||||
psql $POSTGRESQL_DATABASE < /tmp/images/development-image.sql
|
||||
touch /tmp/import_dev_done
|
||||
fi
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/bash
|
||||
FILE=/tmp/import_prod_done
|
||||
|
||||
if [ -f $FILE ]
|
||||
then
|
||||
echo "File $FILE exists..."
|
||||
else
|
||||
psql $POSTGRESQL_DATABASE < /tmp/images/production-image.sql
|
||||
touch /tmp/import_prod_done
|
||||
fi
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/bash
|
||||
FILE=/tmp/kill_db_done
|
||||
|
||||
if [ -f $FILE ]
|
||||
then
|
||||
echo "File $FILE exists..."
|
||||
else
|
||||
ps xa | grep postgres: | grep $POSTGRESQL_DATABASE | grep -v grep | awk '{print $1}' | sudo xargs kill
|
||||
touch /tmp/kill_db_done
|
||||
fi
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/bash
|
||||
FILE=/tmp/migrate_done
|
||||
|
||||
if [ -f $FILE ]
|
||||
then
|
||||
echo "File $FILE exists..."
|
||||
else
|
||||
cd $RAILS_STACK_PATH
|
||||
bundle exec rake db:migrate db:seed_fu
|
||||
touch /tmp/migrate_done
|
||||
fi
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/bash
|
||||
sudo chmod 0644 -R /var/.cloud66_env
|
Loading…
Reference in New Issue