Commit d3441259 authored by jz143's avatar jz143

deploy changes

parent 28a4ca47
{
// Run the app in a production environment. The default value is "development".
"environment": "production",
// Run Passenger on port 80, the standard HTTP port.
"port": 3000,
// Tell Passenger to daemonize into the background.
"daemonize": true
}
......@@ -10,3 +10,18 @@
cap production deploy
```
### See Puma (app server) status
```
bundle exec pumactl -F /home/appstore/appstore/shared/puma.rb status
```
By the way, Puma socket is at:
```
unix:///home/appstore/appstore/shared/tmp/sockets/puma.sock
```
## TODO
* Only keep most recent 3 app versions
* Add ability for app owner to test the app, app version before marking them as 'Published'
* Better app ordering, categories, etc.
* Sidebar on app download page to showcase related apps, as well as more info about us
......@@ -5,18 +5,9 @@ set :application, 'appstore'
set :repo_url, 'git@gitlab.oit.duke.edu:colab/appstore.git'
set :branch, 'deploy'
# Default branch is :master
# ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp
# Default deploy_to directory is /var/www/my_app_name
set :deploy_to, '/home/appstore/appstore'
# Default value for :log_level is :debug
# set :log_level, :debug
# Default value for :pty is false
# set :pty, true
# Default value for :linked_files is []
set :linked_files, fetch(:linked_files, []).push('config/database.yml', 'config/secrets.yml', 'config/settings.local.yml')
......@@ -30,7 +21,7 @@ namespace :deploy do
desc 'Upload secret configuration files'
task :upload_config do
on roles(:app, :ios_sign), in: :sequence do
on roles(:app), in: :sequence do
# secrets
execute :mkdir, '-p', "#{shared_path}/config"
upload! 'config/database.yml', "#{shared_path}/config/database.yml"
......@@ -38,13 +29,7 @@ namespace :deploy do
upload! 'config/settings.local.yml', "#{shared_path}/config/settings.local.yml"
end
# TODO: need to update shared_path because it's different from Debian paths
on roles(:ios_sign) do
# provisioning profiles
execute :mkdir, '-p', "#{shared_path}/resources/ios_provisioning_profiles"
upload! 'resources/ios_provisioning_profiles/CoLab_Member_Apps_20151.mobileprovision',
"#{shared_path}/resources/ios_provisioning_profiles/CoLab_Member_Apps_20151.mobileprovision"
end
# TODO: automate configuring signing server
end
desc 'Restart services'
......
role :app, %w{appstore@appstore.colab.duke.edu}
role :web, %w{appstore@appstore.colab.duke.edu}
role :db, %w{appstore@appstore.colab.duke.edu}
# role :ios_sign, %w{appstore@appstore-mac.colab.managed.jiehan.org}, {
# :deploy_to => '/Users/appstore/appstore'
# }
set :rvm_ruby_version, '2.2.1'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment