<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Linda,<br>
<br>
The images that we've posted to dockerhub were not built with i18n
turned on. That switch needs to have been set to "yes" during the
build process. Which means, you'll probably want to build your own
docker image instead of using the pre-made images.<br>
<br>
Repo: <a class="moz-txt-link-freetext" href="https://github.com/mcoia/eg-docker">https://github.com/mcoia/eg-docker</a><br>
<br>
Building your own image is done like this:<br>
<br>
1. Clone the git repository that does the work:<br>
<br>
git clone <a class="moz-txt-link-freetext" href="https://github.com/mcoia/eg-docker.git">https://github.com/mcoia/eg-docker.git</a><br>
<br>
2. Customize the vars.yml to suit your needs<br>
<br>
cd eg-docker/generic-dockerhub<br>
vi vars.yml<br>
<br>
The main two variables are:<br>
ubuntu_version: focal<br>
evergreen_version: 3.9.1<br>
<br>
I'd change evergreen_version to: 3.11.1<br>
<br>
You're also interested in this setting:<br>
add_evergreen_language_support: no<br>
<br>
If you change that setting to "yes" - it will cause the build to
edit the eg_vhost.conf file during the build.<br>
<br>
But* if you already have an eg_vhost.conf file that you would like
to use, then leave that setting "no" and copy your eg_vhost.conf
file directly into the generic-dockerhub folder.<br>
<br>
You'll need to make one more change in order to incorporate your
eg_vhost.conf:<br>
<br>
# edit Dockerfile<br>
vi Dockerfile<br>
<br>
Add this line:<br>
ADD eg_vhost.conf /egconfigs/eg_vhost.conf<br>
<br>
Put that line right above this line:<br>
RUN cd /egconfigs && ansible-playbook install_evergreen.yml
-v -e "hosts=127.0.0.1"<br>
<br>
so it should look like this:<br>
<br>
.....<br>
ADD vars.yml /egconfigs/vars.yml<br>
ADD install_evergreen.yml /egconfigs/install_evergreen.yml<br>
ADD evergreen_restart_services.yml
/egconfigs/evergreen_restart_services.yml<br>
ADD restart_post_boot.yml /egconfigs/restart_post_boot.yml<br>
ADD eg_vhost.conf /egconfigs/eg_vhost.conf<br>
RUN cd /egconfigs && ansible-playbook install_evergreen.yml
-v -e "hosts=127.0.0.1"<br>
ENTRYPOINT cd /egconfigs && ansible-playbook
evergreen_restart_services.yml -vvvv -e "hosts=127.0.0.1" &&
while true; do sleep 1; done<br>
#ENTRYPOINT while true; do sleep 1; done<br>
<br>
<br>
Now, you're ready to build your own docker image. Like this:<br>
<br>
docker build \<br>
--add-host public.localhost:127.0.1.2 \<br>
--add-host public:127.0.1.2 \<br>
--add-host private.localhost:127.0.1.3 \<br>
--add-host private:127.0.1.3 \<br>
. --no-cache<br>
<br>
You do need to be in the generic-dockerhub folder when you run that
command<br>
<br>
It will take about 15 minutes to complete. Once completed, Docker
will report the sha hash of the image that you just built. You can
see it with this command:<br>
<br>
docker images<br>
<br>
Now that you have your own image. You can start an Evergreen server
from it. Like this:<br>
<br>
<pre><code>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 <your_new_image_sha_hash>
Watch it boot up, and make sure it finishes. You will know that it finishes when you see the "PLAY RECAP" line, and there should be 0 fails.
You can safely disconnect from the container leaving it running using the magic key combination: ctrl+pq (NOT ctrl+c, that will kill it)
</code>
Now that I've said all of that, and you're going to supply your own eg_vhost.conf file, it might be faster to use the pre-built image from dockerhub, boot it up,
then replace the eg_vhost.conf file located in the container, and restart apache2.
So that would look like this:
1. Start docker with the community container:
<code>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:latest</code>
2. Wait for it to finish starting (look for that PLAY RECAP line, and confirm "0 fail"). Press ctrl+pq.
3. SSH into the container
ssh -p 32 user@localhost
the password is "password"
3a. Alternatively, you can attach to the container using "docker exec"
docker exec -it `docker ps -q` bash
4. Once you're on the shell of the container, you need to make your edits to:
/etc/apache2/eg_vhost.conf
note: vi is not installed in the container, you might have to install vi:
apt-get update && apt-get install -y vim
vi /etc/apache2/eg_vhost.conf
(make changes)
Save the file
5. Restart apache
/etc/init.d/apache2 restart
That should do it!
Good luck. Feel free to ask questions!
</pre>
<pre class="moz-signature" cols="72">-Blake-
Conducting Magic
Will consume any data format
MOBIUS</pre>
<div class="moz-cite-prefix">On 8/11/2023 8:17 AM, Jane Sandberg via
Evergreen-general wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAH++r7E5Hxkc0yWkxKUYLKciNjRsrnS4xKHHG5sv+BjdnWdK7A@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">That is very mysterious!
<div><br>
</div>
<div>These steps worked for me to add the 950 db seed in
French within a docker container:</div>
<div><br>
</div>
<div>
<div>docker exec -it [container_name] bash</div>
<div>cd /home/opensrf/repos/Evergreen</div>
<div>make -f Open-ILS/src/extras/Makefile.install
ubuntu-focal-translator</div>
<div>su opensrf</div>
<div>cd build/i18n</div>
<div>mkdir locale</div>
<div>make newpot</div>
<div>make LOCALE=fr-CA updatepo</div>
<div>exit # go back to root user</div>
<div>cd /home/opensrf/repos/Evergreen/build/i18n &&
make LOCALE=fr-CA install</div>
<div>su evergreen</div>
<div>psql -f
Open-ILS/src/sql/Pg/950.data.seed-values-fr-CA.sql</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">El vie, 11 ago 2023 a la(s)
05:51, Linda Jansová (<a href="mailto:linda.jansova@gmail.com"
moz-do-not-send="true" class="moz-txt-link-freetext">linda.jansova@gmail.com</a>)
escribió:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div>Thank you very much, Jane!</div>
<div><br>
</div>
<div>We currently use the dev tag (but we may also try some
other non-dev tags as you have suggested :-); actually, it
seems that the language selector in the OPAC correctly
appears after a couple of reloads, then - for a couple of
other reloads - it disappears only to appear again after
some more reloads ;-).</div>
<div><br>
</div>
<div>It definitely works in mysterious ways so far; we would
probably also need to add the 950 db seed with French (and
Czech) translations. Any ideas how to do this correctly?</div>
<p>Linda</p>
<div>On 8/11/23 14:25, Jane Sandberg wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">Hi Linda,
<div><br>
</div>
<div>What tag of the Evergreen container are you
using? I believe that the instructions under
"Restarting Evergreen services" are only
applicable to the "dev" tag (i.e. if you ran
`docker run
[...] mobiusoffice/evergreen-ils:dev`). If
you don't specify a tag, it defaults to the
"latest" tag, which doesn't contain the
file-based restart/recompile methods.</div>
<div><br>
</div>
<div>I typically use the non-dev tags, using the
following steps to restart apache.
Theoretically, they should work if you are
using the dev tag too, but I haven't tried
them:</div>
<div><br>
</div>
<div>1. docker ps # this will show the name of
the running container</div>
<div>2. docker exec -it [container_name] bash #
this will provide a shell within the running
container. For example, if step 1 had
mentioned that the running Evergreen container
is named "peaceful_spence", it would be
`docker exec -it peaceful_spence bash`</div>
<div>3. apache2ctl restart # simply restarts
apache. When I need to restart all services, I
use `ansible-playbook
/egconfigs/evergreen_restart_services.yml -e
hosts="127.0.0.1"` instead.</div>
<div><br>
</div>
<div>Hope this helps,</div>
<div><br>
</div>
<div> -Jane</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">El vie, 11 ago 2023 a
la(s) 04:28, Linda Jansová via Evergreen-general (<a
href="mailto:evergreen-general@list.evergreen-ils.org"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">evergreen-general@list.evergreen-ils.org</a>)
escribió:<br>
</div>
<blockquote class="gmail_quote">
<div>
<p> </p>
Dear all,
<p>We have just started experimenting with a Docker
container (<a
href="https://hub.docker.com/r/mobiusoffice/evergreen-ils"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://hub.docker.com/r/mobiusoffice/evergreen-ils</a>),
mainly to see whether it could help us identify
what causes i18n issues reported in a separate
thread (with a subject "Evergreen 3.11.0a not
properly switching into Czech in the staff
client").</p>
<p>At this point we are a bit stuck as we would like
to make appropriate i18n changes to the
eg_vhost.conf file and then make them visible both
in the OPAC and in the staff client.</p>
<p>We have uncommented lines related to French
translation (just to see if it works before we
would make a deep dive into Czech) and restarted
Evergreen as described at <a
href="https://hub.docker.com/r/mobiusoffice/evergreen-ils"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://hub.docker.com/r/mobiusoffice/evergreen-ils</a>
(under the heading "Restarting Evergreen
services") but it doesn’t seem to change anything
in the OPAC.</p>
<p>How exactly should we proceed?</p>
<p>(Maybe a more specific piece of documentation
that would answer our question is available
somewhere; in that case, sharing a URL would be
great :-).)</p>
<p>Thank you in advance!</p>
<p>Linda </p>
<p> </p>
</div>
_______________________________________________<br>
Evergreen-general mailing list<br>
<a
href="mailto:Evergreen-general@list.evergreen-ils.org"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">Evergreen-general@list.evergreen-ils.org</a><br>
<a
href="http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general"
rel="noreferrer" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general</a><br>
</blockquote>
</div>
</blockquote>
<p><br>
</p>
</div>
</blockquote>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Evergreen-general mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Evergreen-general@list.evergreen-ils.org">Evergreen-general@list.evergreen-ils.org</a>
<a class="moz-txt-link-freetext" href="http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general">http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general</a>
</pre>
</blockquote>
<br>
</body>
</html>