diff --git a/Dockerfile b/Dockerfile index 3f884a5..05d8506 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,13 +28,12 @@ RUN npm install --production # --name master --displayName Master --email admin --password password # upgrade the AuthoringTool and or Framework -#RUN node upgrade --Y/n Y +# RUN node upgrade --Y/n Y # guest: 5000, host: 5000 # guest: 5858, host: 5858 # guest: 27017, host: 27027 -# cd /vagrant/ -# pm2 start processes.json +EXPOSE 5000 -EXPOSE 5000 \ No newline at end of file +CMD pm2 start --no-daemon processes.json diff --git a/README.md b/README.md new file mode 100644 index 0000000..35a4ac4 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +README.md +================= + +Do this once: + +``` +docker-compose -f docker-compose.setup.yml run --rm setup + +``` + +Then `docker-compose up -d`. \ No newline at end of file diff --git a/docker-compose.setup.yml b/docker-compose.setup.yml new file mode 100644 index 0000000..25cf257 --- /dev/null +++ b/docker-compose.setup.yml @@ -0,0 +1,22 @@ +version: '2' + +volumes: + adaptdata: + external: + name: dockeradaptauthoring_adaptdata + +services: + setup: + build: . + container_name: adaptauthoring + # extends: + # file: docker-compose.yml + # service: authoring + # volumes_from: + # - adaptauthoring + volumes: + - 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 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..0fce663 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,21 @@ +version: '2' + +volumes: + adaptdata: + +services: + db: + container_name: adaptdb + image: mongo + authoring: + volumes: + - adaptdata:/adapt_authoring + container_name: adaptauthoring + build: . + command: pm2 start --no-daemon processes.json + links: + - db + # depends_on: + # - db + ports: + - "5000:5000"