-
Notifications
You must be signed in to change notification settings - Fork 2
installation
mmx edited this page Dec 7, 2018
·
16 revisions
- npm
- yarn
- webpack
- mysql
- Redis
- Elasticsearch (optional)
- Clone the git repo
git clone https://github.com/maxivak/rails-base-app
- or download from github
edit .gitignore to include folders and files you don't want to have in remote repository.
create secrets.yml and set:
- secret_key_base - random string
- db connection (db, db_user, db_password)
- http authentication if you want to close this version by password (admin_pwd)
see secrets.example.yml for example.
# config/secrets.yml
development:
secret_key_base: YourKeyHere
devise_secret_key: another_key_for_devise
db_host: localhost
db_name: my_db_name
db_user: root
db_password:
test:
..
beta:
secret_key_base: YourKeyHere
devise_secret_key: another_key_for_devise
admin_pwd: betapass
db_host: localhost
db_name: test_my_cms_tpl
db_user: root
db_password: "dbpwd"
production:
secret_key_base: YourKeyHere
devise_secret_key: another_key_for_devise
db_host: localhost
db_name: my_db_name
db_user: dbu
db_password: "somepwd"
- secret keys can be generated with:
rails secret- import database
rake optimacms:install:import_db
it will load database dump from file __db/init.sql
- load dump from custom sql file
filename=path/to/my/file.sql rake optimacms:install:import_db
! NOTE ! it will delete all existing data in the database.
- run
rake optimacms:install:assetsit will copy packages and assets for OptimaCMS.
- set your app name
# config/initializers/preferences.rb
#
Rails.application.config.SITE_NAME = 'myapp'- change password for default user 'admin' (admin@example.com)
rake optimacms:users:set_password['admin','newpassword']
- or remove default admin user
rake optimacms:users:remove['admin']
- create a new admin user
rake optimacms:users:create_admin_user['admin','admin@mysite.com','mypwd1234']
- install ruby gems
bundle install
- install packages with yarn
yarn installbundle exec rails webpacker:compileor
rails assets:precompile- run the site in development
Access site in development:
http://localhost:3000
admin area:
http://localhost:3000/admin
-
edit
config/deploy.rband files inconfig/deploydirectory. -
Read this about deployment.
Sync application data with remote storages - read deploy.
Read settings