If already exists and you want to start fresh DANGER: This will kill it all including data
docker-compose down
docker-compose system prune
docker rm -f (docker ps -a -q)
docker volume rm (docker volume ls -q)
Bundle:
bundle install
You may see an error with Zookeeper not being installed correctly. On Linux, the fix for this is:
CFLAGS=-Wno-error=format-overflow gem install zookeeper -v ‘1.4.11’ --source ‘https://rubygems.org/’
In order to access the super-admin host as well as the normal tenants, you will need to add them to your /etc/hosts
. This will depend on what your tenants cname's are, however an example host file might look like this:
127.0.0.1 localhost
::1 localhost
# Hyku
127.0.0.1 hyku.docker # Required for the super admin to work
127.0.0.1 repo.hyku.docker # One of the tenants for this instantion
127.0.0.1 anschutz.hyku.docker # Another tenant
Please note, you will have to use the :3000
to access the tenants, as you would for any normal Rails app: http://hyku.docker:3000/
Docker Compose Up and allow debugging (via byebug)
docker-compose up -d web workers; docker attach hyku_addons_web_1
Enter bash inside container
docker-compose exec web /bin/bash
bundle exec rails app:hyku_addons:superadmin:create
Goto the accounts screen http://hyku.docker:3000/proprietor/accounts?locale=en
Goto the console
docker-compose exec web bundle exec rails console
Copy the string returned from secure random for use as the account UUID
SecureRandom.uuid
Run the following:
# bundle exec rails "app:hyku:account:create[Name, Copied UUID, CNAME, Email from above]"
docker-compose exec web bundle exec rails "app:hyku:account:create[test, aa070467-09d7-4b13-bb5a-7192f900e6c3, test.hyku.docker, [email protected]]"
Your user will need to be activated as invitations are not sent locally
docker-compose exec web bundle exec rails console
AccountElevator.switch!(Account.first.cname)
# NOTE: The password is being set again as it doesn't seem to be correct when trying to login
User.first.update(invitation_token: nil, invitation_accepted_at: DateTime.current, password: 'test1234')