Merge branch 'version-lock' of git@github.com:garyritchie/docker-adaptauthoring.git
# Conflicts: # README.md
This commit is contained in:
commit
8fc3f07c8e
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!Dockerfile
|
10
Dockerfile
10
Dockerfile
|
@ -1,10 +1,14 @@
|
||||||
FROM node:4-wheezy
|
FROM node:4-wheezy
|
||||||
|
|
||||||
|
ENV AAT_VER=0.2.2
|
||||||
|
|
||||||
|
MAINTAINER Gary Ritchie <gary@garyritchie.com>
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
libssl-dev \
|
|
||||||
git \
|
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
|
git \
|
||||||
|
libssl-dev \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# global npm dependencies
|
# global npm dependencies
|
||||||
|
@ -13,7 +17,7 @@ RUN npm install -g pm2 \
|
||||||
&& npm install -g adapt-cli
|
&& npm install -g adapt-cli
|
||||||
|
|
||||||
RUN cd / \
|
RUN cd / \
|
||||||
&& git clone https://github.com/adaptlearning/adapt_authoring.git
|
&& git clone --branch v${AAT_VER} https://github.com/adaptlearning/adapt_authoring.git
|
||||||
|
|
||||||
WORKDIR /adapt_authoring
|
WORKDIR /adapt_authoring
|
||||||
|
|
||||||
|
|
91
README.md
91
README.md
|
@ -5,8 +5,21 @@ Authoring SCORM-compatible training using the [Adapt Authoring](https://github.c
|
||||||
|
|
||||||
Login credentials are set from a .env file (See _Config_ section).
|
Login credentials are set from a .env file (See _Config_ section).
|
||||||
|
|
||||||
Getting Started
|
Getting Started - docker-compose
|
||||||
---------------------
|
---------------------------------
|
||||||
|
|
||||||
|
### Config
|
||||||
|
|
||||||
|
Add an `.env` file with the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
ADMIN_EMAIL=admin
|
||||||
|
ADMIN_PASSWORD=password
|
||||||
|
```
|
||||||
|
|
||||||
|
This is read during "setup."
|
||||||
|
|
||||||
|
### Setup
|
||||||
|
|
||||||
Do this once:
|
Do this once:
|
||||||
|
|
||||||
|
@ -39,41 +52,77 @@ node install --install Y --serverPort 5000 --serverName localhost --dbHost adapt
|
||||||
|
|
||||||
Exit and then restart the container.
|
Exit and then restart the container.
|
||||||
|
|
||||||
Config
|
### Clean Up
|
||||||
----------
|
|
||||||
|
|
||||||
Add an `.env` file with the following:
|
#### To remove containers
|
||||||
|
|
||||||
```
|
|
||||||
ADMIN_EMAIL=admin
|
|
||||||
ADMIN_PASSWORD=password
|
|
||||||
```
|
|
||||||
|
|
||||||
This is read during "setup."
|
|
||||||
|
|
||||||
Clean Up
|
|
||||||
-----------
|
|
||||||
|
|
||||||
### To remove containers
|
|
||||||
|
|
||||||
```
|
```
|
||||||
docker-compose down
|
docker-compose down
|
||||||
```
|
```
|
||||||
|
|
||||||
### To remove data (courses)
|
#### To remove data (courses)
|
||||||
|
|
||||||
This will delete your hard work. Are you sure?
|
This will delete your hard work.
|
||||||
|
|
||||||
```
|
```
|
||||||
docker volume rm dockeradaptauthoring_adaptdb
|
docker volume rm dockeradaptauthoring_adaptdb
|
||||||
docker volume rm dockeradaptauthoring_adaptdata
|
docker volume rm dockeradaptauthoring_adaptdata
|
||||||
```
|
```
|
||||||
|
|
||||||
Backup
|
### Backup
|
||||||
------------
|
|
||||||
|
|
||||||
Create local archives of both the adapt_authoring folder and database:
|
Create local archives of both the adapt_authoring folder and database:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run -it -w /backup -v dockeradaptauthoring_adaptdb:/adaptdb -v $(pwd)/backup:/backup dockeradaptauthoring_authoring bash -c "tar -czvf adaptdata_`date +"%Y-%m-%d_%H-%M-%S"`.tar.gz /adapt_authoring && tar -czvf adaptdb_`date +"%Y-%m-%d_%H-%M-%S"`.tar.gz /adaptdb"
|
docker run -it -w /backup -v dockeradaptauthoring_adaptdb:/adaptdb -v $(pwd)/backup:/backup dockeradaptauthoring_authoring bash -c "tar -czvf adaptdata_`date +"%Y-%m-%d_%H-%M-%S"`.tar.gz /adapt_authoring && tar -czvf adaptdb_`date +"%Y-%m-%d_%H-%M-%S"`.tar.gz /adaptdb"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Getting Started - Using `docker run ...`
|
||||||
|
--------------------------------------------
|
||||||
|
|
||||||
|
### Setup
|
||||||
|
|
||||||
|
`docker run -d --name adaptdb -v adaptdb:/data/db mongo`
|
||||||
|
|
||||||
|
Adjust values such as `--email` and `--password` as desired:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
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"
|
||||||
|
|
||||||
|
```bash
|
||||||
|
Done, without errors.
|
||||||
|
|
||||||
|
The app.productname web application was compiled and is now ready to use.
|
||||||
|
Installation complete.
|
||||||
|
To restart your instance run the command 'pm2 restart all'
|
||||||
|
Bye!
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### 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 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.`
|
||||||
|
|
|
@ -7,7 +7,8 @@ volumes:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
setup:
|
setup:
|
||||||
build: .
|
# build: .
|
||||||
|
image: garyritchie/docker-adaptauthoring:0.2.2
|
||||||
container_name: adaptauthoring
|
container_name: adaptauthoring
|
||||||
# extends:
|
# extends:
|
||||||
# file: docker-compose.yml
|
# file: docker-compose.yml
|
||||||
|
|
|
@ -13,10 +13,11 @@ services:
|
||||||
# ports:
|
# ports:
|
||||||
# - 27017:27017
|
# - 27017:27017
|
||||||
authoring:
|
authoring:
|
||||||
|
container_name: adaptauthoring
|
||||||
|
image: garyritchie/docker-adaptauthoring:0.2.2
|
||||||
volumes:
|
volumes:
|
||||||
- adaptdata:/adapt_authoring
|
- adaptdata:/adapt_authoring
|
||||||
container_name: adaptauthoring
|
# build: .
|
||||||
build: .
|
|
||||||
command: pm2 start --no-daemon processes.json
|
command: pm2 start --no-daemon processes.json
|
||||||
links:
|
links:
|
||||||
- db
|
- db
|
||||||
|
|
Loading…
Reference in New Issue