The project contains the Dockerfiles for all the necessary components of Avalon Media System. For developing with Avalon, the docker-compose script in Avalon and Avalon Bundle are recommended.
- Install Docker
- Install Docker-Compose
- Install Docker Desktop for Mac
docker composeis built into docker now. Don't usedocker-composeon macOS.
- Clone this Repo
- From inside the avalon-docker directory
sudo chmod a+w masterfilesto setup write permission for shared directorydocker compose buildto get the prebuilt images from Dockerhubdocker compose upto stand up the stack.-doption to run in backgrounddocker compose up --buildto build and run in one commanddocker exec -it avalon-docker-uva-avalon-1 bundle exec rake uva:migrate:all_derivativesexample to run rake tasks
To access the site, visit http://localhost in your browser.
docker compose logs <service_name>to see the container(s) logsdocker compose build --no-cache <service_name>to build the image(s) from scratchdocker psto see all running containersdocker exec -it avalon-docker-uva-avalon-1 /bin/bashto log into Avalon docker containerdocker compose exec uva-avalon /bin/bashThis also connects to the running containerdocker compose exec uva-avalon bundle exec rails cis also very usefuldocker system pruneis handy if you start running low on disk space
- The docker-compose.yml file in this project is for local development only and is pre-configured for use without additional environment variables.
- UVA customizations should go into avalon/ and:
- will be copied into the container when built, replacing files from the standard avalon app
- should mirror the Avalon repo
- docker-compose.yml mounts the local ./masterfiles/ into the container.
- ./masterfiles/dropbox is the local dropbox directory
- other persistent storage uses standard docker volumes called:
- streaming: nginx streaming files
- storage: supplemental files stored by activerecord
- database: the local db
- fedora: fedora files
- solr: solr files
- Vim is available in the container
- The first page load takes quite a while as webpacker builds the js assets allowing live code reloading
- Attach to the container to edit the live instance, final changes need to go in
./avalon. docker compose up --buildwill refresh the container with the contents of./avalonand start up the stack, but can be slow
To deploy to avalon-dev make sure that the proper version of avalon_upstream is checked out:
cd PROJECT_DIR/avalon-docker
git submodule init
git submodule update
cd avalon_upstream
git checkout v8.1.1
cd ..
git add avalon_upstream
When changes are pushed to https://github.com/uvalib/avalon-docker the UVALIB infrastructure will restart avalon-dev with the changes.
- required solr upgrade to 9.x
- reindex with
docker exec containerID nohup bundle exec rake avalon:reindex[threads] & bundle exec rake avalon:migrate:collection_managersbundle exec rake avalon:migrate:caption_files
- created bin/yaz-config to allow zoom gem to build
- updated active_encode_uva for active-encode 1.3.0
- updated db/Dockerfile to Postgres 14
- updated solr/Dockerfile to Solr 9