Evergreen ILS for easy local testing
10K+
This project is where we publish docker containers fore each version of Evergreen. A self contained ubuntu 16.04/18.04/20.04/22.04/24.04 server with postgres 9.5/9.6/10/15. Web based staff client and xul runner staff client included (pre EG 3.2). The Evergreen global admin account is defaulted to: admin/demo123
When running the container, you will need to allow certain ports to be passed into the container:
| Reason | docker switch |
|---|---|
| Standard Web | -p 80:80 |
| Standard SSL | -p 443:443 |
| SIP | -p 6001:6001 |
| Z39.50 | -p 210:210 |
| SSH | -p 32:22 |
| PostgreSQL | -p 5433:5432 |
provide a hostname for the container so we don't let docker make one up. If the made-up hostname starts with a numeric value, opensrf will fail to start
docker run -it -p 80:80 -p 443:443 -p 210:210 -p 6001:6001 -p 32:22 -p 5433:5432 -h app.evergreen.com mobiusoffice/evergreen-ils
Once running, you should see an ansible script kick off, which will end with
PLAY RECAP *********************************************************************
127.0.0.1 : ok=74 changed=53 unreachable=0 failed=0
Once you see that, the server is setup and ready for connections. Keep in mind if you press CTRL+C - the server will die. Please use CTRL+pq instead to leave it running.
The SSH login to the docker container is defaulted to: user/password
The Evergreen global admin account is defaulted to: admin/demo123
The Git repo that is used to create the images is here: Github Project
We have discontinued the ejabberd dev container. Only Redis dev container now.
The idea is that you will inject your Evergreen git repository into the container and it will mirror your changes in the server environment.
Linux hosts
docker run -it -p 80:80 -p 443:443 -p 210:210 -p 6001:6001 -p 32:22 -p 5433:5432 -v /home/user/Evergreen:/home/opensrf/repos/Evergreen -h test.evergreen.com mobiusoffice/evergreen-ils:dev
Windows hosts
docker run -it -p 80:80 -p 443:443 -p 210:210 -p 6001:6001 -p 32:22 -p 5433:5432 -v //c/users/blake/Documents/GitHub/Evergreen:/home/opensrf/repos/Evergreen -h test.evergreen.com mobiusoffice/evergreen-ils:dev
This container (evergreen-ils:dev) is designed to have your local filesystem mounted into the container so that you can edit Evergreen files on your local machine. You will want to clone the Evergreen git repository onto your computer and then pass the folder path into the docker run command with the "volume" switch (-v). See above. Be sure and update the example.
This container makes symlinks from your Evergreen repository into various folders in /openils. There are six symlinks:
| local | destination |
|---|---|
| /home/opensrf/repos/Evergreen/Open-ILS/web/js/ui/default/staff | /openils/var/web/js/ui/default/staff |
| /home/opensrf/repos/Evergreen/Open-ILS/web/eg2 | /openils/var/web/eg2 |
| /home/opensrf/repos/Evergreen/Open-ILS/src/perlmods/lib/OpenILS | /usr/local/share/perl/5.34.0/OpenILS |
| /home/opensrf/repos/Evergreen/Open-ILS/web/opac/deps | /openils/var/web/opac/deps |
| /home/opensrf/repos/Evergreen/Open-ILS/src/templates | /openils/var/templates |
| /home/opensrf/repos/Evergreen/Open-ILS/src/templates-bootstrap | /openils/var/templates-bootstrap |
Once the container is running, you can cause the container to restart Evergreen services. You can do this by saving a file in the root of the Evergreen git repository called "eg_restart_go". There is a cron job that runs every minute that looks for that file, if found, it will be deleted and the software will proceed to restart the Evergreen stack, including Ejabberd. You can see the output of the restart while it's restarting in the file "eg_restart_go_screenoutput"
Once the container is running, you can cause the container to rebuild the eg2 Angular client. You can do this by saving a file in the root of the Evergreen git repository called "eg_rebuild_angular". This will only take one or two seconds to trigger a rebuild. The build process can take a minute or so. You can see the output of the rebuild while it's rebuilding in the file "eg_rebuild_angular_screenoutput"
Once the container is running, you can cause the container to create a new database. It will create the database from your current Evergreen working directory. There is a file in the root of your Evergreen folder called db_control.txt. Which is a space delimited file. There are three columns:
| column1 | column2 | column3 |
|---|---|---|
| database_name | database_type | use_this_flag (*) |
The file looks like this to begin with:
evergreen standard *
evergreen_enhanced enhanced
If you move the asterisks to the second line, the container will update the opensrf configuration to point to that database and restart the services automatically.
You can introduce any number of new lines into this file, and without the asterisks. Which will cause the container to immediately create the desired database on postgres with the dataset that you've indicated [standard|enhanced]
The log output of the script doing the work is written to: db_switch.log
It's possible to use Angular watch on your local machine (outside of the dev container) so that your code changes are reflected more quickly.
To do that, you need to get into the shell of the running dev container and make the following tweaks:
# Remove the existing symlink
rm -f /openils/var/web/eg2
# Create a new symlink pointing to the Evergreen directory
ln -s /home/opensrf/repos/Evergreen/Open-ILS/web/eg2 /openils/var/web/eg2
Now you can run "npm run watch" on your local environment
Content type
Image
Digest
sha256:9fdaf2cdf…
Size
1.3 GB
Last updated
about 1 month ago
docker pull mobiusoffice/evergreen-ils