diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c3bfbe6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.env +*.sublime* \ No newline at end of file diff --git a/README.md b/README.md index 35a4ac4..1291d70 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,57 @@ README.md ================= +Authoring SCORM-compatible training using the [Adapt Authoring](https://github.com/adaptlearning/adapt_authoring) tool. + +Getting Started +--------------------- + Do this once: +``` +docker-compose up -d +``` + +wait for a moment, then + ``` docker-compose -f docker-compose.setup.yml run --rm setup ``` -Then `docker-compose up -d`. \ No newline at end of file +Subsequent runnings: `docker-compose up -d`. + +Config +---------- + +Add an `.env` file with the following: + +``` +ADMIN_EMAIL=admin +ADMIN_PASSWORD=password +``` + +This is read during "setup." + +Clean Up +----------- + +### To remove containers + +``` +docker-compose down +``` + +### To remove data (courses) + +This will delete your hard work. Are you sure? + +``` +docker volume rm dockeradaptauthoring_adaptdb +docker volume rm dockeradaptauthoring_adaptdata +``` + +Backup +------------ + +[database and course content] \ No newline at end of file diff --git a/docker-compose.setup.yml b/docker-compose.setup.yml index 25cf257..e15230e 100644 --- a/docker-compose.setup.yml +++ b/docker-compose.setup.yml @@ -18,5 +18,8 @@ services: - adaptdata:/adapt_authoring external_links: - adaptdb - command: 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_EMAIL} --password ${ADMIN_PASSWORD} - # && #node upgrade --Y/n Y \ No newline at end of file + command: 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_EMAIL} --password ${ADMIN_PASSWORD} # && node upgrade --Y/n Y + upgrade: + extends: + service: setup + command: node upgrade --Y/n Y diff --git a/docker-compose.yml b/docker-compose.yml index 0fce663..5191561 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,11 +2,16 @@ version: '2' volumes: adaptdata: + adaptdb: services: db: container_name: adaptdb image: mongo + volumes: + - adaptdb:/data/db + ports: + - 27017:27017 authoring: volumes: - adaptdata:/adapt_authoring