Docs for Docker
Need to add docs for Docker, push to the preferred install mechanism, with pip/manual on linux as an ‘allowed’ alternative.
Comments (134)
-
reporter -
reporter Starting to rework install docs for version 1.0 with Docker. Added email settings to env file. Lots more settings to move. Refs #823
→ <<cset 5a427d3e28e3>>
-
reporter rst content for holding file; added env use for regionalisation settings. Ignored virtual directory for now. Refs #823
→ <<cset de58226ef7aa>>
-
reporter Starting to populate env config docs. Refs #823
→ <<cset 98b850a1c543>>
-
reporter Fixing mistakes in last commit. Refs #823
→ <<cset dba3b87e28b2>>
-
reporter Added email settings, trying a different format. Refs #823
→ <<cset da017bc5b254>>
-
reporter Syntax didn't work, trying again. Refs #823 [skip ci] Docs only
→ <<cset 6ebd78280403>>
-
reporter Added the remaining variables, trying a new format. Refs #823 [skip ci] Docs only
→ <<cset 474ca27d6f86>>
-
reporter Finished changing format of env_variables. New docker orthanc config doc. Refs #823 [skip ci] Docs only
→ <<cset 8b77a5308e00>>
-
reporter A little tidying plus stump for additional Orthanc settings. Refs #823 [skip ci] Docs only
→ <<cset 30aa6b1ac90b>>
-
reporter Turns out we can set the Orthanc port, doing so will make the interface more intuitive. Refs #823,
#824[skip ci] Docs only→ <<cset c3ef46cd9893>>
-
reporter Merged in issue823dockerdocs (pull request #368)
Refs #823
Issue remains open, much more to do.
→ <<cset 4753a221defe>>
-
reporter Adding Toshiba import config to docker_orthanc.rst. Refs #823 [skip ci] docs only
→ <<cset e86b04344f4e>>
-
reporter Updating Orthanc variables, adding web interface options. Reordering of release notes text. Refs
#813, #823 [skip ci] docs only→ <<cset 2e29ae1fe157>>
-
reporter Updated docker_orthanc.rst to reflect Orthanc config being moved out into secrets file. Refs #823 [skip ci] docs only.
→ <<cset 87873dec7241>>
-
reporter Edits after first read-through of rendered docs. Refs #823 [skip ci] docs only.
→ <<cset 512a8c825f5f>>
-
reporter Minor update to upgrade docs. Refs #823 [skip ci] docs only.
→ <<cset 2eea5531aea0>>
-
reporter Addressing running qr from command line and schedule using Docker. Refs #823,
#874[skip ci] docs only. See https://docs.openrem.org/en/issue823dockerdocs/netdicom-qr.html→ <<cset 82e5e7b5529f>>
-
reporter Minor formatting changes. Refs #823,
#874[skip ci] docs only.→ <<cset 7fc39f217186>>
-
reporter New Docker-style database document. Refs #823 [skip ci] docs only.
→ <<cset e7b4044e01bb>>
-
reporter Minor improvement to initial Install docs. Refs #823 [skip ci] docs only.
→ <<cset c85704de0e07>>
-
reporter Added restore instructions. Removed reference to skin map restore, as was problematic and irrelevant with new version. Refs #823,
#833[skip ci] docs only.→ <<cset 919708fd1918>>
-
reporter Moved useful content of postgresql and reference markers to database.rst. Refs #823 [skip ci] docs only.
→ <<cset 725d066050b9>>
-
reporter Deleted Windows Postgres backup-restore and setup docs, added legacy note for all references to it... Refs #823 [skip ci] docs only.
→ <<cset 05f9e4613af8>>
-
reporter Removed Windows MySQL docs. Refs #823 [skip ci] docs only.
→ <<cset 8e7099f91d19>>
-
reporter Missed a colon - try again. Refs #823 [skip ci] docs only.
→ <<cset c08c799e7551>>
-
reporter CHange to legacy title, fixed two refs to it. Refs #823 [skip ci] docs only.
→ <<cset 8f2935e550ae>>
-
reporter Changing the heading depth so webserver config makes sense. Refs #823 [skip ci] docs only.
→ <<cset b88a6657f489>>
-
reporter Updating code_dev_env.rst with some things from startservices and some ideas from the wiki page about Windows dev env. Refs #823 [skip ci] docs only.
→ <<cset 1a67060a9b3d>>
-
reporter Working on removing start services docs, adding concurrency instruction here for now; might be better to remove as default and have instructions in docs. Refs #823 [skip ci] docs only.
→ <<cset 4651972ec3eb>>
-
reporter Minor title changes to help me work out reorganising the advanced config docs. Refs #823 [skip ci] docs only
→ <<cset d5f06d7c92cc>>
-
reporter Set concurrency to default in both Docker and Linux installs, new doc to explain how to specify. Next is to add Flower options. Refs #823 [skip ci] docs only
→ <<cset c71c488f5d18>>
-
I’m just at the start of following the docs. I’m going to post questions here as I go along.
The first relates to changing
DJANGO_ALLOWED_HOSTS
in the.env.prod
file, https://docs.openrem.org/en/latest/env_variables.htmlI know I need to include
127.0.0.1
, but I don’t know what the[::1]
means, and I don’t know if I have to leave the existingopenrem
andnginx
there, or replace them with something else. -
reporter [::1]
is local host in IPv6.Having more than you need in there is fine. I agree that the text could be more helpful. What you need (I think) is the servername that clients will be using, but I need to check that it doesn’t need the container name for the in-Docker networking.
I’ll do some testing.
-
Running
docker-compose up -d
results in the following error on my Windows 10 Pro laptop:D:\docker\OpenREM1.0dev>docker-compose up -d
openrem10dev_broker_1 is up-to-date
openrem-orthanc-1 is up-to-date
openrem-db is up-to-date
openrem10dev_worker_1 is up-to-date
openrem is up-to-date
openrem10dev_flower_1 is up-to-dateStarting openrem-nginx ...
Starting openrem-nginx ... error
ERROR: for openrem-nginx Cannot start service nginx: driver failed programming external connectivity on endpoint openrem-nginx (7df2d279e87d0ba75a56620ca149709c786d3c6afd9738213181520800f1b91f): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: An attempt was made to access a socket in a way forbidden by its access permissions.ERROR: for nginx Cannot start service nginx: driver failed programming external connectivity on endpoint openrem-nginx (7df2d279e87d0ba75a56620ca149709c786d3c6afd9738213181520800f1b91f): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
ERROR: Encountered errors while bringing up the project.I’ve cleaned out my other Docker containers and images, and still get this error.
-
reporter What happens if you change it to a high port - in docker-compose.yml in the nginx section change the ports from 80:80 to 8080:80
-
reporter Did it let you bring Orthanc up on port 104? In which case I wonder if you are running IIS or something, and the port is already in use. There’ll be some sort of netstat command you can run to see.
-
I’ve run a netstat command and found the PID of the process on port 80, but it’s not IIS. It’s a system process that I can’t track down (
netstat -n -a -o
). It’sntoskrnl.exe
that is using the port, located inC:\Windows\System32
.Changing this bit of the docker-compose.yml from
ports: - 80:80
to
ports: - 8080:80
Works.
-
reporter And presumably as it was a clash rather than a high-port/low-port thing, it might work on 81 or similar too?
-
It is a clash, so would work on 81 or similar.
-
I’m now trying to upgrade using a 0.10.0 backup database.
The command
docker cp /path/to/openremdump.bak db_backup/
in the https://docs.openrem.org/en/issue823dockerdocs/release-1.0.0.html document results in:
must specify at least one container source
The exact command I used was:
PS D:\docker\OpenREM1.0dev> docker cp D:\temp\2020-12-14_1505_OpenREMdatabase.backup db_backup/
-
I think the command should be:
docker cp /path/to/openremdump.bak openrem-db:db_backup/
(at least, that seemed to work)
-
reporter Oh no! There shouldn’t be docker at the start of that! You are just copying into the local folder
-
When I ran the
docker-compose exec openrem python manage.py makemigrations remapp
I was asked:
Did you rename userprofile.median_available to userprofile.plotBoxplots (a BooleanField)? [y/N] n
Did you rename userprofile.median_available to userprofile.plotMedian (a BooleanField)? [y/N] n
I answered n to both
-
When I ran the command:
docker-compose exec openrem python django-admin compilemessages
I received the following error:
python: can't open file 'django-admin': [Errno 2] No such file or directory
-
Despite the django-admin error I do now seem to have a working Docker-based installation which is using the migrated 0.10.0 database. Hooray!
-
reporter You must be using the wrong docs… I’ve updated the commands on https://docs.openrem.org/en/issue823dockerdocs/installation.html#windows-or-linux-docker-install
-
reporter This page in the docs is particularly important for your use-case, as I’ve attempted to explain how you would implement your customisations to the Orthanc setup: https://docs.openrem.org/en/issue823dockerdocs/docker_orthanc.html
-
The
docker-compose exec openrem python django-admin compilemessages
command is on this page, describing how to upgrade an existing installation, which I’ve been following:https://docs.openrem.org/en/issue823dockerdocs/release-1.0.0.html
It looks like the command on that page needs updating to the one on this page:
https://docs.openrem.org/en/issue823dockerdocs/installation.html#windows-or-linux-docker-install
-
reporter Good point. Thanks.
-
@Ed McDonagh my Orthanc container won’t start. How do I trouble-shoot it?
PS D:\docker\OpenREM1.0dev> docker container list CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 158b449c2f5d nginx:1.17.8-alpine "nginx -g 'daemon of…" 2 days ago Up 45 hours 0.0.0.0:8080->80/tcp openrem-nginx af13d80272e1 openrem/openrem:develop "/home/app/openrem/e…" 3 days ago Up 45 hours 8000/tcp openrem 784f83f47c3f openrem/openrem:develop "/home/app/openrem/e…" 3 days ago Up 45 hours 5555/tcp openrem10dev_flower_1 975c6a1415d2 openrem/openrem:develop "/home/app/openrem/e…" 3 days ago Up 45 hours openrem10dev_worker_1 b69695875b0b openrem/orthanc "/bin/bash -c 'apt-g…" 3 days ago Restarting (100) 19 seconds ago openrem-orthanc-1 5a74ce55d787 postgres:12.0-alpine "docker-entrypoint.s…" 3 days ago Up 45 hours 5432/tcp openrem-db 70aca4af0b1c rabbitmq:3-management-alpine "docker-entrypoint.s…" 3 days ago Up 45 hours 4369/tcp, 5671-5672/tcp, 15671-15672/tcp, 15691-15692/tcp, 25672/tcp openrem10dev_broker_1 PS D:\docker\OpenREM1.0dev>
-
The http://127.0.0.1:8080/openrem/dicom/store/add/ page states that the initial default Docker container name is orthanc_1. On my Windows system this is not the case - the container is called “openrem-orthanc-1”.
-
reporter I need to do all the troubleshooting docs.
List containers with
docker-compose ps
Get logs for the orthanc container with
docker-compose logs -f orthanc_1
see if that gives you a clue.The name we use is that of the
service
we define in thedocker-compose.yml
file, soorthanc_1
. -
Swapping
image: openrem/orthanc
for the vanilla
image: osimis/orthanc
in the
orthanc_1
section ofdocker-compose.yml
has made it work for me. It must be related to the package update and installation in theopenrem/orthanc
container. However, the logs indicate that the updating had worked.
-
Actually, the
Dockerfile
contents foropenrem/orthanc
is:FROM osimis/orthanc:master RUN apt-get update && apt-get -y install zip unzip
It doesn’t actually tell Orthanc to run, it just runs an apt update and install.
Should there be a CMD in there at the end to specify which command to run within the container?
-
reporter Assuming your
openrem/orthanc
image wasn’t old, it shouldn’t have made any difference. Can you see how old that image is (docker images
) - and if it is more than 14 days old can you pull a new one and try it again? (docker pull openrem/orthanc
)The Dockerfile simply adds zip and unzip to the main release. I’m considering removing the functions so it isn’t necessary!
-
reporter Hi David. Can you pull latest in again, and see if it now works for you? (
docker pull openrem/orthanc:latest
)I have triggered a new build, and presumably the Osimis image has been updated because it only used the first two layers from cache. I have no idea what went wrong with the last one, obviously something did!
It now works for me again, specifying
openrem/orthanc:latest
in thedocker-compose.yml
file. -
This works for me now - thanks.
-
I’ve set up a test Docker-based OpenREM system on a new server running Windows Server 2019.
At the moment I have installed Docker Desktop.
I’ve created a scheduled task to start Docker Desktop on boot. At the moment this is running as my local user - I need to get it running using the SYSTEM account.
When the system reboots OpenREM comes back to life. However, Celery does not. This is because the celery.pid file still exists in the logs folder.
Is there scope to delete celery.pid as part of the start up of OpenREM?
-
I have written a basic batch file that deletes logs\celery.pid before Docker Desktop is started. Hopefully this will fix the problem for me.
-
reporter I thought I had dealt with that, but I obviously haven’t.
Can you disable the batch file that deletes the pid file, and modify the
docker-compose.yml
file as follows:worker: command: celery worker -A openremproject -Q default --logfile=/logs/celery.log
i.e. to remove the
--pidfile
flag.Then try again
-
@Ed McDonagh that worked - thanks. I just have to work out how to get Docker to launch at boot as the SYSTEM user rather than as me (my password will change at some point).
I also think that I should be using Docker Enterprise instead of Docker Desktop - that’s probably the answer.
-
For my Windows Server 2019 Docker installation port 80 worked for the webserver:
ports: - 80:80
-
reporter Minor formatting. Refs #823 [skip ci] docs only
→ <<cset 05306f7fc639>>
-
reporter Clarified DJANGO_ALLOWED_HOSTS line in env file. Refs #823
→ <<cset daa1799da455>>
-
reporter Improving previous allowed hosts language, addressing some of David's points regarding docker docs. Refs #823
→ <<cset 4591ca40c709>>
-
reporter Adding in some basic troubleshooting information. Refs #823 [skip ci] docs only.
→ <<cset b6b39b29ac7c>>
-
On Linux there’s a permissions issue once you’ve extracted the develop.zip file. When I tried the docker-compose up -d command several of the services kept on restarting. I then made some very generous changes to the permissions of the folder and all files in it, and the docker-compose up -d worked OK. Not sure what the exact permission requirements are.
-
reporter Where did you extract the files to?
-
I created a new Ubuntu user called
openrem
and added it to thedocker
andsudo
groups (I had to create thedocker
group first). I then logged in as this user and downloaded and extracted thedevelop.zip
file into theopenrem
user's home directory. -
I perhaps should add that I installed Docker during the Ubuntu Server installation process as a snap.
-
reporter That is probably relevant, as I don’t think I’ve seen this before. But snap changes everything!
-
I just thought that using the snap was the easiest way of installing Docker, especially when it was being offered as part of the operating system process.
-
reporter Absolutely. And we should definitely try it. But we should expect some permission issues etc as it is effectively a locked down container itself!
-
If I add a
user: root
line in each service then I don't have any permissions errors when running the snap-based Docker installation. Extract below:
services: openrem: container_name: openrem user: root restart: unless-stopped image: openrem/openrem:develop
The new line is required for each service in the file.
Without this, the containers are being run by a user called
app
which doesn’t have any rights to change files in the host folders.When using the above method the files that are created in the bind mounted folders are owned by
root
. I don’t know if that is a problem:openrem@openremubuntu:~/openrem-docker-6dda9460edd3$ ls -al ./logs/ total 12 drwxrwxr-x 2 openrem openrem 4096 Jan 28 16:56 . drwxrwxr-x 7 openrem openrem 4096 Jan 28 16:52 .. -rw-r--r-- 1 root root 772 Jan 28 16:53 celery.log -rw-rw-r-- 1 openrem openrem 0 Jan 15 22:55 .gitkeep -rw-r--r-- 1 root root 0 Jan 28 16:52 openrem_extractor.log -rw-r--r-- 1 root root 0 Jan 28 16:52 openrem.log -rw-r--r-- 1 root root 0 Jan 28 16:52 openrem_qr.log -rw-r--r-- 1 root root 0 Jan 28 16:52 openrem_store.log
-
reporter With apt installed docker, and no user defined in docker-compose.yml:
mcdonaghe@FRP5019Ubuntu:~/research/test-docker/openrem-docker-ffa6c5d33790$ ls -l logs/ total 96 -rw-r--r-- 1 mcdonaghe mcdonaghe 27976 Jan 28 08:58 celery.log -rw-r--r-- 1 mcdonaghe mcdonaghe 2 Jan 4 21:12 celery.pid -rw-r--r-- 1 mcdonaghe mcdonaghe 0 Dec 29 12:40 openrem_extractor.log -rw-r--r-- 1 mcdonaghe mcdonaghe 54138 Jan 19 08:59 openrem.log -rw-r--r-- 1 mcdonaghe mcdonaghe 0 Dec 29 12:40 openrem_qr.log -rw-r--r-- 1 mcdonaghe mcdonaghe 0 Dec 29 12:40 openrem_store.log mcdonaghe@FRP5019Ubuntu:~/research/test-docker/openrem-docker-ffa6c5d33790$ docker-compose exec openrem ls -l /logs total 96 -rw-r--r-- 1 app app 27976 Jan 28 08:58 celery.log -rw-r--r-- 1 app app 2 Jan 4 21:12 celery.pid -rw-r--r-- 1 app app 54138 Jan 19 08:59 openrem.log -rw-r--r-- 1 app app 0 Dec 29 12:40 openrem_extractor.log -rw-r--r-- 1 app app 0 Dec 29 12:40 openrem_qr.log -rw-r--r-- 1 app app 0 Dec 29 12:40 openrem_store.log
So in Docker, the user is
app
, the same files in Ubuntu are owned by me.Having them owned by
root
might cause an issue, because the docker build assumes Django and the python files are owned byapp
-
Maybe we should require the use of the non-snap version of Docker. There are lots of discussions online about permission issues with the snap version.
-
I have now removed the snap-based Docker and am using an apt-installed one from the Docker repository following the instructions here: https://docs.docker.com/engine/install/ubuntu/
I am running into permission issues with this too when running the
docker-compose exec openrem python manage.py migrate remapp --fake
command.The “app” user doesn’t have permission to write files to the logs folder on the host.
-
reporter Is this with a fresh folder - you don’t have any if the previous attempts files or permissions in there?
-
Yes, a fresh folder - I deleted the old one entirely, and then unzipped the develop.zip file again.
-
The permissions issue is specific to the
logs
folder. Allowing write access to all users from the host (sudo chmod 777 ./logs
) fixes the problem for the snap and apt versions of Docker. -
reporter And which user owns the files on the Ubuntu side (and which on the Docker container side)?
-
On the host side:
openrem@openremubuntu:~/openrem-docker-6dda9460edd3$ ls -al ./logs/ total 12 drwxrwxrwx 2 openrem openrem 4096 Jan 29 10:35 . drwxrwxr-x 7 openrem openrem 4096 Jan 29 10:23 .. -rw-r--r-- 1 dplatten dplatten 708 Jan 29 10:23 celery.log -rw-rw-r-- 1 openrem openrem 0 Jan 15 22:55 .gitkeep -rw-r--r-- 1 dplatten dplatten 0 Jan 29 10:19 openrem_extractor.log -rw-r--r-- 1 dplatten dplatten 0 Jan 29 10:19 openrem.log -rw-r--r-- 1 dplatten dplatten 0 Jan 29 10:19 openrem_qr.log -rw-r--r-- 1 dplatten dplatten 0 Jan 29 10:19 openrem_store.log -rw-r--r-- 1 dplatten dplatten 0 Jan 29 10:35 testing
On the container side:
openrem@openremubuntu:~/openrem-docker-6dda9460edd3$ docker-compose exec openrem ls -al /logs total 12 drwxrwxrwx 2 1001 1001 4096 Jan 29 10:35 . drwxr-xr-x 1 root root 4096 Jan 29 10:23 .. -rw-rw-r-- 1 1001 1001 0 Jan 15 22:55 .gitkeep -rw-r--r-- 1 app app 708 Jan 29 10:23 celery.log -rw-r--r-- 1 app app 0 Jan 29 10:19 openrem.log -rw-r--r-- 1 app app 0 Jan 29 10:19 openrem_extractor.log -rw-r--r-- 1 app app 0 Jan 29 10:19 openrem_qr.log -rw-r--r-- 1 app app 0 Jan 29 10:19 openrem_store.log -rw-r--r-- 1 app app 0 Jan 29 10:35 testing
Hmm. I was expecting the host side to be owned by the
openrem
user. -
reporter So that is the same as mine now (apart from the
openrem
user) Was the777
required? Or was that because the folder is owned by openrem and the files are written bydplatten
? -
I had to set 777 for the logs folder for it to work. I don’t understand why dplatten is involved. I may reset things and try again.
-
reporter I expect the user that runs `
docker-compose up`
will own the files -
I’ve just purged all of my containers and volumes, deleted the unzipped folder and started again.
All using the
openrem
user.I had to use
sudo chmod 777 ./logs
again - after the initialdocker-compose up -d
several of the containers were in a restarting loop.Once I’d made the chmod change the containers all came up.
However, on the host the log files are all owned by
dplatten
, not byopenrem
. -
@Ed McDonagh does bringing the logs, db_backup etc folders into the containers require a rebuild of the docker images?
-
reporter Are you referring to implementing the decision we made to not use bind mounts?
I’ve not worked it all through yet. For containers like nginx, using bind mounts is really useful to add configurations to vanilla upstream images. And for database backups and logs the tools aren’t quite as nice as I’d hoped - there is a
cp
function in either direction, which I guess could work for the config too, but norm
or similar.So we might do something like:
Create db backups as before (we are referencing the container internal path as before, but this time it would be in a volume):
docker-compose -f /path/to/docker-compose.yml exec db pg_dump -U openrem_user -d openrem_prod -F c -f "/db_backup/openremdump-"$TODAY"
But then you copy it out using
docker cp openrem:db_backup/openremdump* .
Looking at the logs might be:
docker-compose exec openrem ls -lrth /logs docker-compose exec openrem less /logs/openrem-qr.log
I haven’t tried these, so I’ve probably got the syntax wrong. Just wanted to get this message written before going out for a walk - this is the third attempt I’ve had to get this written - keep getting interrupted and losing the text!
-
reporter Initial pass at installing or upgrading to docker with no bind volumes and no secrets file. Refs #823 [skip ci] docs only
→ <<cset 6e78994ab65c>>
-
reporter @David Platten I’ve had a stab at a
docker-compose.yml
file and docs that don’t have any bind volumes or secrets files.Download https://bitbucket.org/openrem/docker/get/nobind.zip
Follow the install or upgrade docs at https://docs.openrem.org/en/issue823nobindsecrets/installation.html and https://docs.openrem.org/en/issue823nobindsecrets/release-1.0.0.html#set-up-the-new-installation
I haven’t had a chance to test it, so expect mistakes. If you do, let me know!
-
reporter Hi @David Platten don’t try it! Or if you do, expect it to fail!
-
reporter Having the Orthanc scripts folder as a non-bind volume is a bit of a pain it turns out. Because the Lua script is referenced in the Orthanc config, the container falls over on startup. But we can’t copy the script in until the container is up.
So we could work around it with a temporary container like one of these examples: https://github.com/moby/moby/issues/25245
Or we could use bind folders for things that the containers will read but not write - so Orthanc and Nginx configs in bind mounts, and things that the container will write such as logs, we use a non-bind volume.
What do you think @David Platten ?
-
I agree@Ed McDonagh - I think that using bind folders where the contents will be read is a good idea. The folders that need to be written to by containers can be kept inside the container.
-
reporter Restoring config files to bind mounts so they don't need to be copied in. Refs #823 [skip ci] docs only
→ <<cset 7158e73c975b>>
-
reporter Adding log directory to image. Refs #823 [skip ci] docs only
→ <<cset aee072cf2d05>>
-
reporter Adding accessing the log files to docs. Refs #823 [skip ci] docs only
→ <<cset b41b50190bb9>>
-
reporter Accidentally left -t in. Refs #823 [skip ci] docs only
→ <<cset 6a4a429bd5b1>>
-
reporter Moving log files part of docs. Refs #823 [skip ci] docs only
→ <<cset 0f2bb61af90a>>
-
reporter Hi @David Platten Can you try now?
- New docs for the log files: https://docs.openrem.org/en/issue823nobindsecrets/troubleshooting.html#openrem-log-files
- New ‘nobind’ zip file with
docker-compose.yml
that refers to a new openrem image in Docker Hub: https://bitbucket.org/openrem/docker/get/nobind.zip
I’ve tried it as far as seeing that they come up and stay up, but not any more than that.
-
I’m trying the new version out now.
Copying the database backup to the container folder needs to use “openrem-db”, not “db”:
docker cp /home/openrem/2021-01-25_1627_OpenREMdatabase.backup openrem-db:/db_backup/
-
The rest of the upgrade instructions are perfect (https://docs.openrem.org/en/issue823nobindsecrets/release-1.0.0.html)
-
reporter You are right. For
docker-compose
we have to use the service name defined indocker-compose.yml
(db
in this example), whereas fordocker
we need to use the container name, (openrem-db
here).What is troubling me is that I don’t know how all the containers get the prefix
openrem-
- will that always be the case?Some of the containers are named with a prefix of the folder name (like
openrem-docker-f4b53e8154b1_broker_1
) but others don’t and I don’t know why. When I tried to start a second folder’sdocker-compose
the broker image came up because it has the folder name in the name, but others didn’t because of the name conflict.We could possibly have the instruction as you had, but have a note that if it doesn’t work to check the name of the container?
-
I’ve only seen the db container as openrem-db. It’s only the worker and broker that I’ve seen with the extra characters in their container names.
On another note, I rebooted my virtualbox-based Ubuntu install with Docker-based OpenREM still running to see what would happen. The system wouldn’t shutdown as it was waiting for postgres to shutdown, but postgres was steadfastly staying put. I think postgres was waiting for all database connections to timeout.
Maybe the solution to this is to suggest to users that they include a script that is run at shutdown or reboot that runs
docker-compose down
, and also havedocker-compose up -d
run at boot? -
reporter Hmm. Something to look out for. I wonder if that is generally the case?
-
Re the “slug” in container names: using “container_name” in the docker-compose file sorts it:
https://stackoverflow.com/questions/53531228/remove-random-string-from-docker-container-name
The worker, flower and broker don’t have specific container_names, hence the “slug”.
-
reporter Of course - how did I miss that! I’ll add them in next time I’m changing it, to tidy up. And I’ll test that you can still scale up the worker when it has a container name.
-
Re Postgres blocking the reboot: I forced the virtual machine off, and then restarted it. OpenREM didn’t come back up on reboot. A
docker-compose up -d
gave an error. However, adocker-compose down
followed by adocker-compose up -d
worked. -
reporter Adding a container name prevents scaling of containers. I think the only container you would scale is the worker container - would you agree?
I presume if you knew what you were doing there may be a case for scaling the database, but it is not simple and if you wanted to do that you’d probably be ok adapting the instructions to do so!
This would leave just the worker with a name prefixed with the folder name.
-
reporter Adding imports folder. Refs #823
→ <<cset 02ed338494f7>>
-
reporter Correcting cp command. Refs #823 [skip ci] docs only
→ <<cset 71e5941bdeae>>
-
Started to update the system diagram to reflect the new Docker configuration. Needs further work - comments very welcome [skip ci]. Refs issue #823
→ <<cset 98fcd84e7dcd>>
-
First attempt didn't work. Reverting some labels back to previous format to see if that helps [skip ci]. Refs issue #823
→ <<cset ee837650c89f>>
-
Reverting all labels back to previous format to see if that helps. Need to work out how to format them [skip ci]. Refs issue #823
→ <<cset a9ac443bf9d1>>
-
Trying a single HTML label [skip ci]. Refs issue #823
→ <<cset e75f0d2352ad>>
-
Trying to change the font of the top line of a label [skip ci]. Refs issue #823
→ <<cset e04d41041917>>
-
Using HTML for each Docker container node [skip ci]. Refs issue #823
→ <<cset 4986c7a82afd>>
-
Adding blue border to each Docker container node [skip ci]. Refs issue #823
→ <<cset 73b2ee89a2c7>>
-
Added some notes to the system diagram page. Added a description for the two volumes in the diagram [skip ci]. Refs issue #823
→ <<cset d697e435dcaf>>
-
Increased width of media volume node; slight wording change in the notes [skip ci]. Refs issue #823
→ <<cset 7a5637824b5d>>
-
Could also add links for Metabase (https://www.metabase.com/start/oss/) and Redash (https://redash.io/help/open-source/setup) to the diagram notes on things to connect the database to.
-
reporter Adding notes to the top of each page to warn against updating the translations as the docs are too much in flux right now. Refs #823 [skip ci] docs only
→ <<cset fbac04e422da>>
-
I’ve been installing a docker-based OpenREM on a system where internet access has been removed once the operating system and the Docker snap has been installed.
I obtained a list of required Docker images by looking in the docker-compose file.
I then downloaded the required Docker images on a computer with internet access using these instructions:
I copied them onto the system without internet access and ran the docker-compose up -d command. OpenREM came up without problem.
-
reporter Thanks David. Is that different from https://docs.openrem.org/en/latest/install-offline.html ?
-
No, it's exactly the same... I didn't realise that document was there!
-
reporter Suggestion to have the container name as the blue text, and docker container/volume as a 'type'. Refs #823. Would like to ditch serif font too...
→ <<cset 6ba917acf933>>
-
reporter I hate arial too, but better than helvetica? Added Orthanc. Heights are all wrong. Refs #823. [skip ci] docs only
→ <<cset c0b4777a6991>>
-
reporter Updating Orthanc Docker for not using secrets file. Refs #823 [skip ci] docs only
→ <<cset 1127600049a1>>
-
reporter -
reporter Adding a -T that presumably would be needed for Windows too. Refs #823 [skip ci] docs only
→ <<cset 929b9e41ee83>>
-
reporter -
reporter Minor changes to Docker docs. Refs #823 [skip ci] docs only
→ <<cset 3149cff3f9a6>>
-
reporter Minor edit to troubleshooting. Refs #823 [skip ci] docs only
→ <<cset de461e196986>>
-
reporter Adding renamed No to makemigrations. Refs #823 [skip ci] docs only
→ <<cset 9808773a15f8>>
- Log in to comment
Need to add instruction for adding hostname in .env.prod
DJANGO_ALLOWED_HOSTS
line