[Evergreen-dev] Developing Evergreen with a Docker container companion

Blake Henderson blake at mobiusconsortium.org
Fri Apr 14 11:21:17 EDT 2023


All,

Excuse the cross-list post from the newdevs mailing list.

I wanted to let everyone know that we've been working on a new Docker 
container. One specifically setup to edit Evergreen and have on-the-fly 
results on the Evergreen server.

This container has been tested on Windows and Linux and theoretically 
will work on OSX. Use your favorite OS.

To use it:

1. Install docker on your workstation. On Windows, that's "Docker 
Desktop" (https://www.docker.com/products/docker-desktop/)
2. Make sure you have the Evergreen git repository cloned on your hard 
drive somewhere. Make sure you're on a recent branch. Older branches 
(3.9 and below) may not work, as this container is running Ubuntu Jammy.
3. Once Docker is installed and running, issue this command (update the 
folder paths to match your environment)

Linux example command:

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

Or on Windows (from powershell):

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 is decidedly slower to boot than the "generic" container. 
It's slower because it reinstalls Evergreen with your locally provided 
Evergreen folder. Depending on your hardware, it could take 15 minutes 
to bring the server online.

When you see this:

PLAY RECAP 
*****************************************************************************************************

It's finished. There is a small delay after that in order to get the 
Angular files generated (anything */eg2/* won't work for another minute 
or so).

Be sure and keep it running by pressing CTRL+pq (CTRL+c will kill the 
container)

You should be able to open a browser and browse to 127.0.0.1. You'll 
need to click through any browser warning about SSL certificates.

Default login: admin/demo123 (URL: https://localhost/eg/staff)

Edits to the template toolkit files Open-ILS/src/templates(-bootstrap) 
are live

Edits to the AngularJS folder Open-ILS/web/js/ui/default/staff are live

Edits to the Angular folder Open-ILS/web/eg2 are NOT LIVE
The folder needs to be compiled when files are edited. The container is 
waiting for you to let it know when it should do that. In order to let 
it know, you need to create a regular file in the root of your Evergreen 
folder called "eg_rebuild_angular"

The build output will be provided back to you by way of a file called 
"eg_rebuild_angular_screenoutput"

Perl edits are not live. Changes to Perl will require Evergreen services 
to restart. Similar to the Angular compile trigger, you can trigger the 
container to restart the Evergreen services by placing a regular file in 
the root of your Evergreen folder called "eg_restart_go". The container 
will react on the next minute. It's a cron job that runs on the minute 
every minute.


Terran was kind enough to convert this message into a wiki page:

https://wiki.evergreen-ils.org/doku.php?id=newdevs:testserver

Here is the Docker hub link where we warehouse our images:

https://hub.docker.com/r/mobiusoffice/evergreen-ils

Here is the git repository that was developed to create the image(s)

https://github.com/mcoia/eg-docker


Any and all feedback is welcome!


-- 
-Blake-
Conducting Magic
Will consume any data format
MOBIUS

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.evergreen-ils.org/pipermail/evergreen-dev/attachments/20230414/5cdf2fe4/attachment.htm>


More information about the Evergreen-dev mailing list