Permalink
Browse files

Docker support added

  • Loading branch information...
1 parent b0da6e3 commit 23b7aabefa7e28d2aa0fdff93f6735334ca2c596 Doug Anarino committed Nov 30, 2014
Showing with 420 additions and 470 deletions.
  1. +12 −0 .dockerignore
  2. +27 −0 Dockerfile
  3. +29 −3 README.md
  4. +4 −4 app/bower_components/es5-shim/.bower.json
  5. +7 −0 app/bower_components/es5-shim/CHANGES
  6. +1 −1 app/bower_components/es5-shim/Makefile
  7. +16 −13 app/bower_components/es5-shim/README.md
  8. +1 −1 app/bower_components/es5-shim/bower.json
  9. +1 −1 app/bower_components/es5-shim/component.json
  10. +35 −40 app/bower_components/es5-shim/es5-sham.js
  11. +1 −1 app/bower_components/es5-shim/es5-sham.map
  12. +2 −2 app/bower_components/es5-shim/es5-sham.min.js
  13. +148 −156 app/bower_components/es5-shim/es5-shim.js
  14. +1 −1 app/bower_components/es5-shim/es5-shim.map
  15. +2 −2 app/bower_components/es5-shim/es5-shim.min.js
  16. +3 −3 app/bower_components/es5-shim/package.json
  17. +5 −5 app/bower_components/moviemasher.js/.bower.json
  18. +6 −1 app/bower_components/moviemasher.js/README.md
  19. +1 −1 app/bower_components/moviemasher.js/app/components/moviemasher.min.js
  20. +1 −1 app/bower_components/moviemasher.js/bower.json
  21. +17 −19 app/bower_components/moviemasher.js/dist/moviemasher.js
  22. +1 −1 app/bower_components/moviemasher.js/dist/moviemasher.min.js
  23. +1 −1 app/bower_components/moviemasher.js/package.json
  24. +11 −14 app/bower_components/moviemasher.js/src/filter.js
  25. +5 −4 app/bower_components/moviemasher.js/src/loader.js
  26. +1 −1 app/components/angular-moviemasher.min.js
  27. +13 −1 app/index.max.html
  28. +0 −9 app/module/font/kiri/font.json
  29. BIN app/module/font/kiri/kirifont/KiriFont.otf
  30. BIN app/module/font/kiri/kirifont/KiriFont.ttf
  31. +0 −8 app/module/font/lobster/font.json
  32. BIN app/module/font/lobster/lobster/Lobster.menu
  33. BIN app/module/font/lobster/lobster/Lobster.menu2
  34. BIN app/module/font/lobster/lobster/Lobster.ttf
  35. +0 −12 app/module/font/lobster/lobster/METADATA
  36. +0 −97 app/module/font/lobster/lobster/OFL.txt
  37. BIN app/module/font/lobster/lobster/src/Font Lab Source/Lobster 1.4 merged and optimized.vfb
  38. BIN app/module/font/lobster/lobster/src/Font Lab Source/LobsterSource.vfb
  39. +0 −4 app/module/font/lobster/lobster/src/License.txt
  40. BIN app/module/font/lobster/lobster/src/Lobster 1.4.otf
  41. +0 −10 app/module/font/lobster/lobster/src/Readme.txt
  42. +1 −1 app/php/export_init.php
  43. +1 −1 app/php/import_init.php
  44. +4 −4 app/php/include/apiutils.php
  45. +2 −2 app/php/include/authutils.php
  46. +4 −4 app/php/include/pathutils.php
  47. +1 −1 app/php/mash.php
  48. +1 −1 app/php/save.php
  49. +2 −2 bower.json
  50. +5 −0 config/docker/php.ini
  51. +26 −22 config/moviemasher.ini
  52. +10 −7 dist/angular-moviemasher.js
  53. +1 −1 dist/angular-moviemasher.min.js
  54. +1 −1 package.json
  55. +9 −6 src/angular-moviemasher.js
View
@@ -0,0 +1,12 @@
+.DS_Store
+node_modules*
+app/user*
+app/bower_components/grunt*
+app/bower_components/jshint*
+app/bower_components/jquery*
+.git/*
+source/*
+*.eot
+*.svg
+*.vfb
+*.markdown
View
@@ -0,0 +1,27 @@
+FROM php:apache
+MAINTAINER Movie Masher <support@moviemasher.com>
+
+# create queue directory in case one isn't mounted
+RUN mkdir -p -m 0777 /tmp/moviemasher/queue
+VOLUME /tmp/moviemasher/queue
+
+# create temporary directory in case one isn't mounted
+RUN mkdir -p -m 0777 /tmp/moviemasher/temporary
+VOLUME /tmp/moviemasher/temporary
+
+# allow log directory to be mounted
+RUN mkdir -p -m 0777 /tmp/moviemasher/log
+VOLUME /tmp/moviemasher/log
+
+# install our php configuration
+COPY config/docker/php.ini /usr/local/etc/php/conf.d/moviemasher.ini
+
+# install our movie masher configuration
+COPY config/moviemasher.ini /var/www/config/moviemasher.ini
+
+# install just our web application
+COPY app/ /var/www/html/
+
+# create user data/media directory in case it doesn't exist
+RUN mkdir -p -m 0777 /var/www/html/user
+VOLUME /var/www/html/user
View
@@ -4,25 +4,45 @@
*Example deployment of moviemasher.js and moviemasher.rb utilizing AngularJS, Bootstrap and PHP*
#angular-moviemasher
-Use angular-moviemasher to integrate audio/video editing features into your existing web site or as a starting point for further development. It builds upon both the moviemasher.js and moviemasher.rb projects, as well as the popular PHP middleware layer and AngularJS+Bootstrap for the UI (only Bootstrap's CSS is used).
+Use angular-moviemasher to integrate audio/video editing features into your existing web site or as a starting point for further development. It builds upon both the moviemasher.js and moviemasher.rb projects, as well as the popular PHP middleware layer and AngularJS+Bootstrap for the UI (only Bootstrap's CSS is used, so no reliance on jQuery).
- **empower** your site visitors to edit high quality video and audio
- **integrate** with your existing authentication and storage mechanisms
- **customize** the user interface, workflow and available media
![Image](https://github.com/moviemasher/angular-moviemasher/raw/master/README/ui.jpg "User Interfacee")
+### Overview
The project includes an AngularJS module that manifests a time-based video editing interface, as well as a set of server-side PHP scripts it interacts with. Both the client and server sides are effectively abstractions, sheltering you from the complexity of the underlying moviemasher.js and moviemasher.rb projects respectively.
+- **Docker Image:** `moviemasher/angular-moviemasher` [(Dockerfile)](Dockerfile)
+
The client module wraps around a player object instanced from moviemasher.js, which provides the preview and maintains undo/redo history. The module adds familiar play/pause, volume and associated controls to the player as well as constructing a media browser, timeline and inspector panel. Files from the user's machine can be dropped into the media browser to initiate uploading and preprocessing, and there is a render button that will initiate encoding of the mash into true video format.
The PHP scripts wrap around and monitor the API provided by moviemasher.rb, which handles processor intensive transcode operations like preprocessing of uploads and rendering of mashes. The scripts add basic content management functionality, first authenticating users then storing and retrieving their data.
-### Amazon Web Services Integration
-There are optional PHP configuration settings that support two specfic AWS offerings: S3 for media storage and SQS for job queueing. If set to use an S3 bucket then users will securely upload files directly there without stressing your web server - each request is signed with your key so the bucket can remain read-only to the public. If set to use an SQS queue then jobs are placed in them instead of written to the local queue directory. Callbacks are also added to the job description so job progress can be monitored.
+### AWS Integration
+The system *optionally* supports [Amazon Web Services](http://aws.amazon.com) for media storage and job queueing, through several PHP configuration settings. If set to use an S3 bucket then users will securely upload files directly there without stressing your web server - each request is signed with your key so the bucket can remain read-only to the public. If set to use an SQS queue then jobs are placed in them instead of written to the local queue directory. Callbacks are also added to the job description so job progress can be monitored.
Additionally, the Movie Masher AMI is available in Marketplace and includes all three projects preconfigured to run together as a standalone deployment for testing and building upon. Launching it from their console is by far the simplest way to see the whole system in action - no coding or set up required. It can also be launched with user data in a headless mode with only moviemasher.rb configured to process jobs found in an SQS queue. This allows the AMI to be used in a pooled cluster that can automatically scale up and down depending on the number of jobs pending in the SQS queue.
+### Docker Usage
+The [`moviemasher/angular-moviemasher`](https://registry.hub.docker.com/u/moviemasher/angular-moviemasher/) image on [docker.com](https://docker.com) is based off the official [`php:apache`](https://registry.hub.docker.com/_/php/) image, adding some configuration and copying this project into web root. The Dockerfile contains a **VOLUME** instruction for each directory it works with.
+
+- To make the web site available at your docker IP on port 8080:
+
+ `docker run -d -p 8080:80 --name=angular moviemasher/angular-moviemasher`
+
+ You'll need to subsequently execute `docker stop angular` and `docker rm angular` to stop serving the web site and remove the container created.
+
+All functions should be available at this juncture, except uploading and rendering which will trigger the saving of a job description file into **queue_directory**. Because there is a **VOLUME** instruction for this directory, it can be mounted by other containers - we'll attach it to one run from the [`moviemasher/moviemasher.rb`](https://registry.hub.docker.com/u/moviemasher/moviemasher.rb/) image which will handle the actual transcoding operation.
+
+- To process queued jobs using shared volumes:
+
+ `docker run -d --volumes-from=angular moviemasher/moviemasher.rb process_loop`
+
+ You'll need to subsequently execute `docker stop moviemasher` and `docker rm moviemasher` to stop queue processing and remove the container created. See the [moviemasher.rb](https://github.com/moviemasher/moviemasher.rb) project for other ways to run its image.
+
### How to Install on Your Web Host
@@ -53,6 +73,12 @@ It's important to remember this project is just an *example* deployment and not
- opentype.js
- moviemasher.js
+### User Feedback
+If any problems arise while utilizing this repository, a [GitHub Issue Ticket](https://github.com/moviemasher/angular-moviemasher/issues) should be filed. Please include the job or mash description that's causing problems and any relevant log or console entries - issues with callbacks can typically be resolved faster after seeing entries from the receiving web server's log. Please post your issue ticket in the appropriate repository and refrain from cross posting - all projects are monitored with equal zeal.
+
+### Contributing
+Please join in the shareable economy by gifting your efforts towards improving this project in any way you feel inclined. Pull requests for fixes, features and refactorings are always appreciated, as are documentation updates. Creative help with graphics, video and the web site is also needed. Please contact through [MovieMasher.com](https://moviemasher.com) to discuss your ideas.
+
### Developer Setup
1. install git, npm, bower and grunt
2. npm install
@@ -1,6 +1,6 @@
{
"name": "es5-shim",
- "version": "4.0.3",
+ "version": "4.0.5",
"main": "es5-shim.js",
"repository": {
"type": "git",
@@ -31,11 +31,11 @@
"bower_components",
"tests"
],
- "_release": "4.0.3",
+ "_release": "4.0.5",
"_resolution": {
"type": "version",
- "tag": "v4.0.3",
- "commit": "8f158fe8a5ea282fcf0801761ff0fa83af929259"
+ "tag": "v4.0.5",
+ "commit": "33bbe095f4fb4fea0a3d5b06610aaedf3818339e"
},
"_source": "git://github.com/es-shims/es5-shim.git",
"_target": ">=3.4.0",
@@ -1,3 +1,10 @@
+4.0.5
+ - Update `jscs` so tests pass
+
+4.0.4
+ - Style/indentation/whitespace cleanups.
+ - README tweaks
+
4.0.3
- Fix keywords (#268)
- add some Date tests
@@ -11,7 +11,7 @@ endif
CHANGES_ERROR = $(error No CHANGES specified)
verify-changes:
- @ (git status -sb --porcelain | grep -e ' M CHANGES' > /dev/null) || (echo no CHANGES specified && exit 2)
+ @ (git status -sb --porcelain | \grep -E '^( M|M ) CHANGES' > /dev/null) || (echo no CHANGES specified && exit 2)
release: verify-changes verify-tag
@ OLD_TAG=`git describe --abbrev=0 --tags` && \
@@ -1,8 +1,10 @@
-#es5-shim <sup>[![Version Badge][2]][1]</sup>
+#es5-shim <sup>[![Version Badge][npm-version-svg]][npm-url]</sup>
-[![npm badge][9]][1]
+[![npm badge][npm-badge-png]][npm-url]
-[![Build Status][3]][4] [![dependency status][5]][6] [![dev dependency status][7]][8]
+[![Build Status][travis-svg]][travis-url]
+[![dependency status][deps-svg]][deps-url]
+[![dev dependency status][dev-deps-svg]][dev-deps-url]
`es5-shim.js` and `es5-shim.min.js` monkey-patch a JavaScript context to
contain all EcmaScript 5 methods that can be faithfully emulated with a
@@ -20,7 +22,8 @@ silently fail. Decide carefully whether this is what you want.
## Tests
The tests are written with the Jasmine BDD test framework.
-To run the tests, navigate to <root-folder>/tests/.
+To run the tests, navigate to <root-folder>/tests/ , or,
+simply `npm install` and `npm test`.
## Shims
@@ -152,13 +155,13 @@ To run the tests, navigate to <root-folder>/tests/.
provisions of this method, which you cannot possibly
obtain in legacy engines.
-[1]: https://npmjs.org/package/es5-shim
-[2]: http://vb.teelaun.ch/es-shims/es5-shim.svg
-[3]: https://travis-ci.org/es-shims/es5-shim.png
-[4]: https://travis-ci.org/es-shims/es5-shim
-[5]: https://david-dm.org/es-shims/es5-shim.png
-[6]: https://david-dm.org/es-shims/es5-shim
-[7]: https://david-dm.org/es-shims/es5-shim/dev-status.png
-[8]: https://david-dm.org/es-shims/es5-shim#info=devDependencies
-[9]: https://nodei.co/npm/es5-shim.png?downloads=true&stars=true
+[npm-url]: https://npmjs.org/package/es5-shim
+[npm-version-svg]: http://vb.teelaun.ch/es-shims/es5-shim.svg
+[travis-svg]: https://travis-ci.org/es-shims/es5-shim.svg
+[travis-url]: https://travis-ci.org/es-shims/es5-shim
+[deps-svg]: https://david-dm.org/es-shims/es5-shim.svg
+[deps-url]: https://david-dm.org/es-shims/es5-shim
+[dev-deps-svg]: https://david-dm.org/es-shims/es5-shim/dev-status.svg
+[dev-deps-url]: https://david-dm.org/es-shims/es5-shim#info=devDependencies
+[npm-badge-png]: https://nodei.co/npm/es5-shim.png?downloads=true&stars=true
@@ -1,6 +1,6 @@
{
"name": "es5-shim",
- "version": "4.0.3",
+ "version": "4.0.5",
"main": "es5-shim.js",
"repository": {
"type": "git",
@@ -2,7 +2,7 @@
"name": "es5-shim",
"repo": "es-shims/es5-shim",
"description": "ECMAScript 5 compatibility shims for legacy JavaScript engines",
- "version": "v4.0.3",
+ "version": "v4.0.5",
"keywords": [
"shim",
"es5",
Oops, something went wrong.

0 comments on commit 23b7aab

Please sign in to comment.