Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
titleCreate the App
# Create the app, with the correct environment variable
# Adjust the tags and description based on the environment you are deploying to
nex-cli apps:create maestrano/web-jruby --env-file <path/to/application.mno-hub>  --size 20 --tags "jruby,core,mnohub,production" --desc "MnoHub Production"
 
# Save the app name to a var to make your life easier
export app=clueless-turkey-1

# Transfer app ownership to your parent organization (e.g. maestrano)
nex-cli apps:transfer $app maestrano

# Link the application to the code package
# NOTE: the S3 credentials must have been provided to you by the Maestrano team
nex-cli apps:scm $app --link s3:mnoe-packages/mnohub/releases:v1.0.31.tar.gz --credentials somelogin:somepassword

# Add the mysql and redis add-ons
nex-cli addons:create mysql $app
nex-cli addons:create redis $app


# Review App and wait for addons to be up (MySQL and Redis env vars should be populated)
nex-cli apps:info $app


# Setup one-time option to load the database schema
nex-cli apps:vars $app --add RAILS_LOAD_SCHEMA=true
 
# Launch application
nex-cli apps:up $app
 
# Wait for containers to be up
nex-cli cubes --app $app --all
 
# Remove one-time option to load schema
nex-cli apps:vars $app -d RAILS_LOAD_SCHEMA
 
# Restart your application to ensure the above change
# is taken into account
nex-cli apps:restart $app

# Check the logs
nex-cli apps:logs $app


# Create the Active Admin Tenant and Active Admin User
nex-cli apps:ssh $app
cd /app
rails c $RAILS_ENV


t = Mnoe::Tenant.create!(name: 'Maestrano', domain: 'activeadmin.com', address: 'Active Admin', email:'active-admin@yourdomain.com', country: 'AU')
t.users.create!(name: 'Admin', surname: 'Active Admin', password: '<GENERATEME>', email: '<CHANGEME, will be used for login>', admin: true)



...