From a3e2129b79d72f57edc564e08763e1b0ecc7660c Mon Sep 17 00:00:00 2001 From: Martin Guether Date: Fri, 7 Apr 2017 10:50:48 +0200 Subject: [PATCH] added experiemental docker support --- Dockerfile | 15 +++++++++++++++ README.md | 13 ++++++++++--- docker-compose.yml | 27 +++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bb8022d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM spacedeck/docker-baseimage:latest +ENV NODE_ENV production + +RUN mkdir -p /usr/src/app +WORKDIR /usr/src/app + +COPY package.json /usr/src/app/ +RUN npm install +COPY . /usr/src/app +RUN npm cache clean + +CMD [ "npm", "start" ] + +EXPOSE 9666 + diff --git a/README.md b/README.md index 03431ae..0f42318 100644 --- a/README.md +++ b/README.md @@ -23,14 +23,14 @@ We appreciate filed issues, pull requests and general discussion. Spacedeck uses the following major building blocks: -- Node.js 4.x (Backend / API) +- Vue.js (Frontend) +- Node.js 7.x (Backend / API) - MongoDB 3.x (Datastore) - Redis 3.x (Datastore for realtime channels) -- Vue.js (Frontend) It also has some binary dependencies for media conversion and PDF export: -- imagemagick +- imagemagick, graphicsmagick, libav(+codecs, ffmpeg replacement), audiowaveform (https://github.com/bbcrd/audiowaveform), phantomjs (http://phantomjs.org/) Currently, media files are stored in Amazon S3, so you need an Amazon AWS account and have the ```AWS_ACCESS_KEY_ID``` and ```AWS_SECRET_ACCESS_KEY``` environment variables defined. For sending emails, Amazon SES is required. @@ -47,6 +47,13 @@ To rebuild the frontend CSS styles (you need to do this at least once): export NODE_ENV=development npm start +#experimental docker support + +We have a docker base image at https://github.com/spacedeck/docker-baseimage that includes all required binaries. Based on this image we can use Docker-Compose to bootstrap a Spacedeck including data storages. + +docker-compose build +docker-compose run -e ENV=development -p 9666:9666 -e NODE_ENV=development spacedeck + # License Spacedeck Open is released under the GNU Affero General Public License Version 3 (GNU AGPLv3). diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..084118f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,27 @@ +version: '2' +services: + sync: + image: redis + storage: + image: minio/minio + environment: + - MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE + - MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + ports: + - 9123:9000 + db: + image: mongo + spacedeck: + environment: + - env=development + build: . + volumes: + - ./:/usr/src/app + - /usr/src/app/node_modules + command: npm start + ports: + - 9666:9666 + depends_on: + - db + - sync + - storage \ No newline at end of file