From e89df75c482f6534ea1c3a901584e9477a9781d9 Mon Sep 17 00:00:00 2001 From: Gary Ritchie Date: Sat, 8 Oct 2016 15:13:03 -0400 Subject: [PATCH] Volumes already created during docker run. Skipping upgrade. Replacing build with existing image. --- README.md | 45 +++++++++++++++++++++------------------- docker-compose.setup.yml | 3 ++- docker-compose.yml | 5 +++-- 3 files changed, 29 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index babc74c..cfe65e2 100644 --- a/README.md +++ b/README.md @@ -56,23 +56,18 @@ docker volume rm dockeradaptauthoring_adaptdata [database and course content] + Getting Started - Using `docker run ...` ---------------------------------- +-------------------------------------------- ### Setup -#### Volumes - -`docker volume create --name adaptdata` - -#### Services - `docker run -d --name adaptdb -v adaptdb:/data/db mongo` Adjust values such as `--email` and `--password` as desired: ```bash -docker run -it --rm -P --link adaptdb --name adaptauthoring -v adaptdata:/adapt_authoring garyritchie/docker-adaptauthoring bash -c 'node install --install Y --serverPort 5000 --serverName localhost --dbHost adaptdb --dbName adapt-tenant-master --dbPort 27017 --dataRoot data --sessionSecret your-session-secret --useffmpeg Y --smtpService dummy --smtpUsername smtpUser --smtpPassword smtpPass --fromAddress you@example.com --name master --displayName Master --email admin --password password' +docker run -it -p 5000:5000 --link adaptdb --name adaptauthoring -v adaptdata:/adapt_authoring garyritchie/docker-adaptauthoring bash -c 'node install --install Y --serverPort 5000 --serverName localhost --dbHost adaptdb --dbName adapt-tenant-master --dbPort 27017 --dataRoot data --sessionSecret your-session-secret --useffmpeg Y --smtpService dummy --smtpUsername smtpUser --smtpPassword smtpPass --fromAddress you@example.com --name master --displayName Master --email admin --password password' ``` After a while the container should quit and you should see the following message" @@ -86,22 +81,30 @@ To restart your instance run the command 'pm2 restart all' Bye! ``` -Upgrade the AuthoringTool and or Framework: - -```bash -docker run -it --rm -P --link adaptdb --name adaptauthoring -v adaptdata:/adapt_authoring garyritchie/docker-adaptauthoring bash -c 'node upgrade --Y/n Y' -``` - -After a bit you should see: - -`Great work! Your Adapt authoring tool is now updated.` - -At this point the "adaptauthoring" container has been run twice to configure and update the Adapt Authoring tool. Each time the _container_ was destroyed -- the data is retained within the docker volume created in an earlier step. ### Run Once the "Setup" steps are complete, do: +`docker restart adaptauthoring` + +Adapt authoring tool should now be available at http://localhost:5000/ + + +### Upgrade + +*Please Note:* Upgrading has had mixed results in recent tests. + +Upgrade the AuthoringTool and or Framework (run in a shell): + ```bash -docker run -d -p 5000:5000 --link adaptdb --name adaptauthoring garyritchie/docker-adaptauthoring bash -c 'pm2 start --no-daemon processes.json' -``` \ No newline at end of file +docker exec -it adaptauthoring bash -c 'node upgrade --Y/n Y' +``` + +`node upgrade` has been stalling... `docker run -it -p 5000:5000 --link adaptdb --name adaptauthoring -v adaptdata:/adapt_authoring garyritchie/docker-adaptauthoring bash -c 'node upgrade --Y/n Y'` + +After a bit you should see: + +`Great work! Your Adapt authoring tool is now updated.` + +At this point the "adaptauthoring" container has been run twice to configure and update the Adapt Authoring tool. diff --git a/docker-compose.setup.yml b/docker-compose.setup.yml index e15230e..274a637 100644 --- a/docker-compose.setup.yml +++ b/docker-compose.setup.yml @@ -7,7 +7,8 @@ volumes: services: setup: - build: . + # build: . + image: garyritchie/docker-adaptauthoring container_name: adaptauthoring # extends: # file: docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml index 5191561..c307928 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,10 +13,11 @@ services: ports: - 27017:27017 authoring: + container_name: adaptauthoring + image: garyritchie/docker-adaptauthoring volumes: - adaptdata:/adapt_authoring - container_name: adaptauthoring - build: . + # build: . command: pm2 start --no-daemon processes.json links: - db