2020-10-02 12:51:34 +00:00
|
|
|
# docker-adaptauthoring
|
2016-08-31 18:09:50 +00:00
|
|
|
|
2023-01-16 18:27:57 +00:00
|
|
|
[![Build Status](https://build.coopcloud.tech/api/badges/coop-cloud-chaos-patchs/docker-adaptauthoring/status.svg)](https://build.coopcloud.tech/coop-cloud-chaos-patchs/docker-adaptauthoring)
|
2020-10-02 15:25:22 +00:00
|
|
|
|
2020-10-03 12:09:27 +00:00
|
|
|
Docker configuration for the [Adapt Authoring tool](https://github.com/adaptlearning/adapt_authoring): create SCORM-compatible training.
|
2016-10-25 17:31:04 +00:00
|
|
|
|
2023-01-16 18:27:57 +00:00
|
|
|
Migrated from https://github.com/3-w-c/docker-adaptauthoring
|
|
|
|
|
2020-10-03 12:09:27 +00:00
|
|
|
## Getting started
|
2016-08-31 20:18:52 +00:00
|
|
|
|
2020-10-02 12:51:34 +00:00
|
|
|
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.
|
2016-10-06 11:02:12 +00:00
|
|
|
|
2020-10-02 12:51:34 +00:00
|
|
|
Fetch the example `docker-compose.yml`:
|
2016-10-06 11:02:12 +00:00
|
|
|
|
2020-10-02 12:51:34 +00:00
|
|
|
wget https://github.com/3-w-c/docker-adaptauthoring/blob/master/docker-compose.yml
|
2016-10-06 11:02:12 +00:00
|
|
|
|
2020-10-02 12:51:34 +00:00
|
|
|
Edit the variables under `services.app.environment`, then push the button!
|
2016-10-06 11:02:12 +00:00
|
|
|
|
2020-10-02 12:51:34 +00:00
|
|
|
docker-compose up
|
2016-10-06 11:02:12 +00:00
|
|
|
|
2020-10-03 12:09:27 +00:00
|
|
|
## Configuration
|
|
|
|
|
|
|
|
### Environment variables
|
2016-08-31 20:18:52 +00:00
|
|
|
|
2020-10-02 12:51:34 +00:00
|
|
|
You can configure Adapt's initial set-up using these variables:
|
2016-08-31 18:09:50 +00:00
|
|
|
|
2020-10-02 12:51:34 +00:00
|
|
|
- `DOMAIN` - hostname for the Adapt service
|
|
|
|
- `PORT` (default `5000`) - TCP port for the Adapt service
|
|
|
|
- `DB_HOST` - MongoDB server hostname
|
|
|
|
- `DB_USER` - MongoDB username
|
|
|
|
- `DB_NAME` - MongoDB database name
|
|
|
|
- `SESSION_SECRET` - HTTP session secret key (set to something random)
|
|
|
|
- `ADMIN_EMAIL` - email address for the default superuser account
|
|
|
|
- `ADMIN_PASSWORD` - password for the default superuser account
|
|
|
|
- `FROM_EMAIL` - `From:` email address for notifications
|
2016-08-31 20:18:52 +00:00
|
|
|
|
2020-10-02 16:26:55 +00:00
|
|
|
(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)
|
|
|
|
|
2020-10-03 12:09:27 +00:00
|
|
|
### Docker secrets
|
2016-08-31 18:09:50 +00:00
|
|
|
|
2020-10-02 12:51:34 +00:00
|
|
|
As well as environment variables, you can also load `SESSION_SECRET` and
|
2020-10-02 16:26:55 +00:00
|
|
|
`ADMIN_PASSWORD` from files, which is helpful if you want to keep secret data in
|
2020-10-02 12:51:34 +00:00
|
|
|
[Docker swarm mode secrets](https://docs.docker.com/engine/swarm/secrets).
|
2016-08-31 18:09:50 +00:00
|
|
|
|
2020-10-02 12:51:34 +00:00
|
|
|
Simply set `SESSION_SECRET_FILE` / `ADMIN_PASSWORD_FILE`.
|
2020-10-02 16:26:55 +00:00
|
|
|
|
2020-10-03 12:09:27 +00:00
|
|
|
## 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
|
2020-10-02 16:26:55 +00:00
|
|
|
|
2020-11-20 09:59:31 +00:00
|
|
|
See [`coop-cloud/adapt_authoring`] for an example Docker "swarm mode"
|
2020-10-02 16:26:55 +00:00
|
|
|
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
|
2020-10-03 12:09:27 +00:00
|
|
|
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.
|
2020-11-20 09:59:31 +00:00
|
|
|
- `node upgrade` doesn't work, because code is downloaded as a ZIP archive
|
|
|
|
instead of using a `git clone`
|
2020-10-02 16:26:55 +00:00
|
|
|
|
2020-11-20 09:59:31 +00:00
|
|
|
[`coop-cloud/adapt_authoring`]: https://git.autonomic.zone/coop-cloud/adapt_authoring/
|