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
- Clone this Repo
- Copy dotenv.example to .env and fill in the passwords and Rails secret key base.
- From inside the avalon-docker directory
sudo chmod a+w masterfiles solr_datato setup write permissions for shared directoriesdocker-compose pullto get the prebuilt images from Dockerhubdocker-compose upto stand up the stack
- Create a user account by visiting http://localhost/users/sign_up in your browser.
- Make the user an admin by running
docker-compose exec avalon bundle exec rake avalon:user:admin
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 avalondocker_avalon_1 /bin/bashto log into Avalon docker container
- If the avalon and fedora containers do not come up the first time you run
docker-compose uptry restarting everything:docker-compose down docker-compose up - If you have problems with solr or fedora not starting then add the following to their declarations in docker-compose.yml:
ulimits: nofile: soft: 65536 hard: 65536
Set these Avalon env vars:
SETTINGS__DOMAIN=http://<ip address or hostname>/STREAMING_HOST=<ip address or hostname>so Avalon crafts the right streaming URLs
The nginx HLS image is a special build of nginx with the nginx-vod-module built into it. This image has a default nginx config that works with either a mounted content directory or a remote minio/s3 bucket. For local mounted content, set VOD_MODE to 'local' (default) and mount the content to /data in the container. For remote content, set VOD_MODE to 'remote' and set AVALON_STREAMING_BUCKET_URL to the derivatives bucket (default is http://minio:9000/derivatives/ for use with a minio container in a docker-compose environment).
If you need to make customizations, make a local copy of nginx.conf.template and mount it into the container at /etc/nginx/nginx.conf.template. This template file has variables that are replaced by environment variables on startup: AVALON_DOMAIN, AVALON_STREAMING_PORT, AVALON_STREAMING_BUCKET_URL, and VOD_MODE.