-
Notifications
You must be signed in to change notification settings - Fork 7
ESSI Developer Guide
TO-DO
When building and deploying to a local developer's machine, the copy and ignore rules allow the db/development.sqlite3
file, which is the default database file if no further configuration changes are made, to be copied in from the local directory into the running container. This gets around the issue of not having a properly migrated database in place when the Rails app starts. One benefit of including the developer's database file in the build is that the running Rails app in the container will be identical to the when it is running as a local Rails app because the database will be the same and presumably be pointed to the same Fedora/Solr.
So to build correctly and deploy, the local environment should be complete with a migrated database and the necessary AdminSet task completed:
-
git clone...; cd to cloned directory)
-
bundle exec rake db:migrate
-
In separate windows, provide Fedora/Solr for the container:
- solr_wrapper
- fcrepo_wrapper
- Once Fedora/Solr are running, create the AdminSet in the local app directory:
- bundle exec rails hyrax:default_admin_set:create
- Now build and run:
- docker build --tag=essi .
- docker run --net="host" -p 3000:3000 essi
Notes:
- A local instance of Redis should also be running on the host machine.
- If using Docker for Mac, all
localhost
and127.0.0.1
references should be replaced withhost.docker.internal
inconfig/essi_config.example.yml
.