From d38d3184cb06550ad3a9031b43a5188d54d377d2 Mon Sep 17 00:00:00 2001 From: code2lab Date: Wed, 29 May 2019 17:49:02 +0630 Subject: [PATCH] SX project --- config/database.yml.sample | 91 +++++--------------------------------- config/facebook.yml | 11 +++++ config/puma.rb | 18 ++++---- config/secrets.yml | 15 ++----- 4 files changed, 35 insertions(+), 100 deletions(-) create mode 100644 config/facebook.yml diff --git a/config/database.yml.sample b/config/database.yml.sample index 02c6afe3..211fb2f0 100755 --- a/config/database.yml.sample +++ b/config/database.yml.sample @@ -1,83 +1,16 @@ -# ## SQLIte3 --- Setup -# -# # SQLite version 3.x -# # gem install sqlite3 -# # -# # Ensure the SQLite 3 gem is defined in your Gemfile -# # gem 'sqlite3' -# # -# default: &default -# adapter: sqlite3 -# pool: 5 -# timeout: 5000 -# -# development: -# <<: *default -# database: db/development.sqlite3 -# -# # Warning: The database defined as "test" will be erased and -# # re-generated from your development database when you run "rake". -# # Do not set this db to the same as development or production. -# test: -# <<: *default -# database: db/test.sqlite3 -# -# production: -# <<: *default -# database: db/production.sqlite3 - -# Mysql --- Setup -# MySQL. Versions 5.0 and up are supported. -# -# Install the MySQL driver -# gem install mysql2 -# -# Ensure the MySQL gem is defined in your Gemfile -# gem 'mysql2' -# -# And be sure to use new-style password hashing: -# http://dev.mysql.com/doc/refman/5.7/en/old-client.html -# default: &default - adapter: mysql2 - encoding: utf8 - pool: 5 - username: root - password: - socket: /tmp/mysql.sock + adapter: postgresql + host: localhost + pool: 5 + timeout: 5000 + encoding: unicode + username: wunna + password: admin123 + port: 5432 development: - <<: *default - database: SXRestaurants_development - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - <<: *default - database: SXRestaurants_test - -# As with config/secrets.yml, you never want to store sensitive information, -# like your database password, in your source code. If your source code is -# ever seen by anyone, they now have access to your database. -# -# Instead, provide the password as a unix environment variable when you boot -# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database -# for a full rundown on how to provide these environment variables in a -# production deployment. -# -# On Heroku and other platform providers, you may have a full connection URL -# available as an environment variable. For example: -# -# DATABASE_URL="mysql2://myuser:mypass@localhost/somedatabase" -# -# You can use this database configuration with: -# -# production: -# url: <%= ENV['DATABASE_URL'] %> -# + <<: *default + database: SXDatabase production: - <<: *default - database: SXRestaurants_production - username: SXRestaurants - password: <%= ENV['SXRESTAURANTS_DATABASE_PASSWORD'] %> + <<: *default + database: paymal diff --git a/config/facebook.yml b/config/facebook.yml new file mode 100644 index 00000000..a60b0def --- /dev/null +++ b/config/facebook.yml @@ -0,0 +1,11 @@ +development: +## with doemal account +app_id: 1049017345154593 +secret: 36b2d6132deb803aa9d503d0034e7a68 + +## My account +#app_id: 434807636720506 +#secret: b94c5e35cde5a2c13cfb2e1ba8be30c6 + + + \ No newline at end of file diff --git a/config/puma.rb b/config/puma.rb index 6f7c4941..b5aa06b3 100755 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,10 +1,10 @@ -application_path="#{File.expand_path("../..", __FILE__)}" -directory application_path +#application_path="#{File.expand_path("../..", __FILE__)}" +#directory application_path # environment ENV.fetch("RAILS_ENV") { "production" } -environment "production" -pidfile "#{application_path}/tmp/puma/pid" -state_path "#{application_path}/tmp/puma/state" -stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log" -port ENV.fetch("PORT") { 62158 } -workers 2 -preload_app! +#environment "production" +#pidfile "#{application_path}/tmp/puma/pid" +#state_path "#{application_path}/tmp/puma/state" +#stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log" +#port ENV.fetch("PORT") { 62158 } +#workers 2 +#preload_app! diff --git a/config/secrets.yml b/config/secrets.yml index 0282c5fc..0536042a 100755 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -11,21 +11,12 @@ # if you're sharing your code publicly. development: - secret_key_base: b61d85f8ed2a1a9e0eeece3443b3e8f838d002cc1d9f32115d8e93db920e2957adfedc57501d44741211538f3108b742cdeada87d5bfae796c53da1f90a3cd61 - sx_provision_url: connect.smartsales.asia/api #connect.smartsales.dev/api #connect.smartsales.asia/api #provision.zsai.ws/api - server_mode: application - cipher_type: AES-256-CBC - sx_key: Wh@t1$C2L + secret_key_base: a17cafd23cb0d29cf61d909be65790f19f25a117683b25a23419b8cdf87d9ec21135e031130f6192998e385017ec1c3250e493c0e42c2e6241b66e14048c6eb5 test: - secret_key_base: 5c92143fd4a844fdaf8b22aba0cda22ef1fc68f1b26dd3d40656866893718ae5e58625b4c3a5dc86b04c8be0a505ec0ebc0be3bf52249a3d1e0c1334ee591cf0 + secret_key_base: 477062b07514b11d98ad096b82d81cd692af7a9f084e022dc65cfe02b26b01d11dcf950e624927894a3a1850fde5c82c0b27d8a24686b6c2d522154d0adaffec # Do not keep production secrets in the repository, # instead read values from the environment. production: - secret_key_base: c4bc81065013f9a3506d385bcbd49586c42e586488144b0de90c7da36867de9fa880f46b5c4f86f0ce9b7c783bb5a73bdb0e5605a47716567294390e726d3e22 - sx_provision_url: connect.smartsales.asia/api #192.168.1.147:3002/api - server_mode: application - cipher_type: AES-256-CBC - sx_key: Wh@t1$C2L - + secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>