added experiemental docker support

This commit is contained in:
Martin Guether 2017-04-07 10:50:48 +02:00
parent 2e34b317a4
commit a3e2129b79
3 changed files with 52 additions and 3 deletions

15
Dockerfile Normal file
View File

@ -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

View File

@ -23,14 +23,14 @@ We appreciate filed issues, pull requests and general discussion.
Spacedeck uses the following major building blocks: 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) - MongoDB 3.x (Datastore)
- Redis 3.x (Datastore for realtime channels) - Redis 3.x (Datastore for realtime channels)
- Vue.js (Frontend)
It also has some binary dependencies for media conversion and PDF export: 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. 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 export NODE_ENV=development
npm start 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 # License
Spacedeck Open is released under the GNU Affero General Public License Version 3 (GNU AGPLv3). Spacedeck Open is released under the GNU Affero General Public License Version 3 (GNU AGPLv3).

27
docker-compose.yml Normal file
View File

@ -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