Compare commits
5 Commits
57f568bdca
...
547068bb48
Author | SHA1 | Date |
---|---|---|
3wc | 547068bb48 | |
3wc | 4b972903dd | |
3wc | 11d767b20f | |
3wc | 1afef99027 | |
3wc | c1b26a5747 |
|
@ -1,6 +1,6 @@
|
||||||
FROM node:12.18.4-stretch
|
FROM node:12.18.4-stretch
|
||||||
|
|
||||||
ENV AAT_VER=0.10.4
|
ENV AAT_VER=0.10.5
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
|
|
59
README.md
59
README.md
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/3wordchant/adaptauthoring)
|
![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/3wordchant/adaptauthoring)
|
||||||
|
|
||||||
Authoring SCORM-compatible training using the [Adapt Authoring](https://github.com/adaptlearning/adapt_authoring) tool.
|
Docker configuration for the [Adapt Authoring tool](https://github.com/adaptlearning/adapt_authoring): create SCORM-compatible training.
|
||||||
|
|
||||||
## How to use this image
|
## Getting started
|
||||||
|
|
||||||
Because Adapt requires a database to run, the easiest way to get started is to use `docker-compose` to set up Adapt and MongoDB automatically.
|
Because Adapt requires a database to run, the easiest way to get started is to use `docker-compose` to set up Adapt and MongoDB automatically.
|
||||||
|
|
||||||
|
@ -16,7 +16,9 @@ Edit the variables under `services.app.environment`, then push the button!
|
||||||
|
|
||||||
docker-compose up
|
docker-compose up
|
||||||
|
|
||||||
## Environment variables
|
## Configuration
|
||||||
|
|
||||||
|
### Environment variables
|
||||||
|
|
||||||
You can configure Adapt's initial set-up using these variables:
|
You can configure Adapt's initial set-up using these variables:
|
||||||
|
|
||||||
|
@ -30,10 +32,57 @@ You can configure Adapt's initial set-up using these variables:
|
||||||
- `ADMIN_PASSWORD` - password for the default superuser account
|
- `ADMIN_PASSWORD` - password for the default superuser account
|
||||||
- `FROM_EMAIL` - `From:` email address for notifications
|
- `FROM_EMAIL` - `From:` email address for notifications
|
||||||
|
|
||||||
## Docker secrets
|
(If you edit these settings after set-up, you'll need to manually edit
|
||||||
|
`/adapt_authoring/conf/config.json` with the new values as well)
|
||||||
|
|
||||||
|
### Docker secrets
|
||||||
|
|
||||||
As well as environment variables, you can also load `SESSION_SECRET` and
|
As well as environment variables, you can also load `SESSION_SECRET` and
|
||||||
`ADMIN_PASSWORD` from files, which is helpful if want to keep secret data in
|
`ADMIN_PASSWORD` from files, which is helpful if you want to keep secret data in
|
||||||
[Docker swarm mode secrets](https://docs.docker.com/engine/swarm/secrets).
|
[Docker swarm mode secrets](https://docs.docker.com/engine/swarm/secrets).
|
||||||
|
|
||||||
Simply set `SESSION_SECRET_FILE` / `ADMIN_PASSWORD_FILE`.
|
Simply set `SESSION_SECRET_FILE` / `ADMIN_PASSWORD_FILE`.
|
||||||
|
|
||||||
|
## Clean Up
|
||||||
|
|
||||||
|
### To remove containers
|
||||||
|
|
||||||
|
```
|
||||||
|
docker-compose down
|
||||||
|
```
|
||||||
|
|
||||||
|
### To remove data (courses)
|
||||||
|
|
||||||
|
This will delete your hard work.
|
||||||
|
|
||||||
|
```
|
||||||
|
docker volume rm dockeradaptauthoring_adaptdb
|
||||||
|
docker volume rm dockeradaptauthoring_adaptdata
|
||||||
|
```
|
||||||
|
|
||||||
|
## Backup
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
|
## Deployment
|
||||||
|
|
||||||
|
### Docker Swarm
|
||||||
|
|
||||||
|
See [`coop-cloud/adapt_authoring`] for an example Docker "swarm mode"
|
||||||
|
configuration, including secrets, SSL reverse proxy, and continuous integration
|
||||||
|
tests of the stack deployment.
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
- If you run the installer script many times in quick succession, you might get
|
||||||
|
rate-limited by Github (the script checks Github for the latest Adapt
|
||||||
|
Authoring version, and to clone the Authoring Framework and plug-ins). Wait
|
||||||
|
an hour, or use a VPN.
|
||||||
|
- `node upgrade` doesn't work, because code is downloaded as a ZIP archive
|
||||||
|
instead of using a `git clone`
|
||||||
|
|
||||||
|
[`coop-cloud/adapt_authoring`]: https://git.autonomic.zone/coop-cloud/adapt_authoring/
|
||||||
|
|
|
@ -2,6 +2,7 @@ version: '2'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
|
container_name: adapt
|
||||||
image: 3wordchant/adaptauthoring:0.10.4
|
image: 3wordchant/adaptauthoring:0.10.4
|
||||||
build: .
|
build: .
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -14,16 +15,7 @@ services:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
environment:
|
env_file: .env
|
||||||
- PORT=5000
|
|
||||||
- DOMAIN=adapt.localhost
|
|
||||||
- DB_HOST=db
|
|
||||||
- DB_NAME=adapt
|
|
||||||
- DB_USER=adapt
|
|
||||||
- SESSION_SECRET=foobar
|
|
||||||
- ADMIN_EMAIL=foo@bar.com
|
|
||||||
- ADMIN_PASSWORD=foo
|
|
||||||
- FROM_EMAIL=adapt@localhost
|
|
||||||
|
|
||||||
db:
|
db:
|
||||||
container_name: adaptdb
|
container_name: adaptdb
|
||||||
|
|
|
@ -28,7 +28,7 @@ load_vars() {
|
||||||
}
|
}
|
||||||
|
|
||||||
install_adapt() {
|
install_adapt() {
|
||||||
echo "No 'conf' dir found, installing Adapt"
|
echo "No 'conf' dir found, running 'node install...'"
|
||||||
# 3wc: use `yes` to skip the dbPass and dbAuthSource prompts
|
# 3wc: use `yes` to skip the dbPass and dbAuthSource prompts
|
||||||
yes "" | node install --install Y \
|
yes "" | node install --install Y \
|
||||||
--authoringToolRepository https://github.com/adaptlearning/adapt_authoring.git \
|
--authoringToolRepository https://github.com/adaptlearning/adapt_authoring.git \
|
||||||
|
@ -50,11 +50,6 @@ install_adapt() {
|
||||||
#--smtpUsername "${SMTP_USERNAME}" --smtpPassword "${SMTP_PASSWORD}" \
|
#--smtpUsername "${SMTP_USERNAME}" --smtpPassword "${SMTP_PASSWORD}" \
|
||||||
}
|
}
|
||||||
|
|
||||||
update_adapt() {
|
|
||||||
echo "Upgrade Adapt Authoring Tool & Framework"
|
|
||||||
node upgrade --continue Y --updateAutomatically Y
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
@ -62,8 +57,6 @@ main() {
|
||||||
|
|
||||||
if [ ! -d conf ]; then
|
if [ ! -d conf ]; then
|
||||||
install_adapt
|
install_adapt
|
||||||
else
|
|
||||||
update_adapt
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue