Compare commits
No commits in common. "547068bb483f236806b97e8a8492d1ae2d254cb6" and "57f568bdca75445e8ae7c295b24ef2f103df631a" have entirely different histories.
547068bb48
...
57f568bdca
|
@ -1,6 +1,6 @@
|
|||
FROM node:12.18.4-stretch
|
||||
|
||||
ENV AAT_VER=0.10.5
|
||||
ENV AAT_VER=0.10.4
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
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 configuration for the [Adapt Authoring tool](https://github.com/adaptlearning/adapt_authoring): create SCORM-compatible training.
|
||||
Authoring SCORM-compatible training using the [Adapt Authoring](https://github.com/adaptlearning/adapt_authoring) tool.
|
||||
|
||||
## Getting started
|
||||
## How to use this image
|
||||
|
||||
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,9 +16,7 @@ Edit the variables under `services.app.environment`, then push the button!
|
|||
|
||||
docker-compose up
|
||||
|
||||
## Configuration
|
||||
|
||||
### Environment variables
|
||||
## Environment variables
|
||||
|
||||
You can configure Adapt's initial set-up using these variables:
|
||||
|
||||
|
@ -32,57 +30,10 @@ You can configure Adapt's initial set-up using these variables:
|
|||
- `ADMIN_PASSWORD` - password for the default superuser account
|
||||
- `FROM_EMAIL` - `From:` email address for notifications
|
||||
|
||||
(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
|
||||
## Docker secrets
|
||||
|
||||
As well as environment variables, you can also load `SESSION_SECRET` and
|
||||
`ADMIN_PASSWORD` from files, which is helpful if you want to keep secret data in
|
||||
`ADMIN_PASSWORD` from files, which is helpful if want to keep secret data in
|
||||
[Docker swarm mode secrets](https://docs.docker.com/engine/swarm/secrets).
|
||||
|
||||
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,7 +2,6 @@ version: '2'
|
|||
|
||||
services:
|
||||
app:
|
||||
container_name: adapt
|
||||
image: 3wordchant/adaptauthoring:0.10.4
|
||||
build: .
|
||||
volumes:
|
||||
|
@ -15,7 +14,16 @@ services:
|
|||
- "5000:5000"
|
||||
networks:
|
||||
- internal
|
||||
env_file: .env
|
||||
environment:
|
||||
- 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:
|
||||
container_name: adaptdb
|
||||
|
|
|
@ -28,7 +28,7 @@ load_vars() {
|
|||
}
|
||||
|
||||
install_adapt() {
|
||||
echo "No 'conf' dir found, running 'node install...'"
|
||||
echo "No 'conf' dir found, installing Adapt"
|
||||
# 3wc: use `yes` to skip the dbPass and dbAuthSource prompts
|
||||
yes "" | node install --install Y \
|
||||
--authoringToolRepository https://github.com/adaptlearning/adapt_authoring.git \
|
||||
|
@ -50,6 +50,11 @@ install_adapt() {
|
|||
#--smtpUsername "${SMTP_USERNAME}" --smtpPassword "${SMTP_PASSWORD}" \
|
||||
}
|
||||
|
||||
update_adapt() {
|
||||
echo "Upgrade Adapt Authoring Tool & Framework"
|
||||
node upgrade --continue Y --updateAutomatically Y
|
||||
}
|
||||
|
||||
main() {
|
||||
set -eu
|
||||
|
||||
|
@ -57,6 +62,8 @@ main() {
|
|||
|
||||
if [ ! -d conf ]; then
|
||||
install_adapt
|
||||
else
|
||||
update_adapt
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue