Coder Social home page Coder Social logo

media-docker's Introduction

media-docker

AGPLv3 License

A dockerized media server module
Tested with proxy-docker ( nginx reverse proxy : https://github.com/DINA-Web/proxy-docker -configured to handle 'large' files )
The media-docker is running on 'wildfly:8.2.1.Final'
configuration to handle 'large' files :
'/subsystem=undertow/server=default-server/http-listener=default/:write-attribute(name=max-post-size,value=1048576000)' , see the file wildfly-custom/customization/commands.cli

Before starting

the default URL for your mediaserver

  1. The mediaserver is set up with URL = 'api.nrm.se'
  2. that is configured in the 'docker-compose.yml'
  3. that is configured in the nginx-conf/mediaserver.conf
  4. that is configured in the 'mysql-autoload/update-admin_config.sql' (update this file before db-creation)
  5. that is set for the testing of the server, see /self-test/Makefile

be sure to update the /etc/hosts-file with 'api.nrm.se'


Start up the mediaserver

$ make

Test the mediaserver:

before testing : check nr of records in your database : ./self-test/db_count.sh

testing post an image to the mediaserver server

  1. cd self-test
  2. $ make ( posts an image with SIZE=1000 and displays the image in firefox )
  3. default-values are : HOST=api.nrm.se, SIZE = 1000
  4. increase the size of the image : $ make SIZE=5000

did firefox display the image of the dragon?

After testing : check nr of records in your database : ./self-test/db_count.sh


The response from above posting contains the key 'mediaURL' which contains the URL to the posted image, see [below](https://github.com/Inkimar/dw-media_docker#using-the-api)

Using the Makefile

make starts the services from scratch ( target 'init' fetches the artifacts)

make clean stops and removes services and data

###Directories

  1. './srv/log/', contains wildfly's 'server.log(s)'
  2. './srv/media/', mediafiles are stored here

For other available actions, please see the Makefile

Using the API

Assuming that the hostname api.nrm.se :

GET against http://api.nrm.se/MediaServerResteasy/media/v1/`uuid`?format=image/jpeg will return an image

Documentation can be found at: https://github.com/DINA-Web/mediaserver-module

Full API docs (in-progress) can be found at: http://docs.media8.apiary.io

media-docker's People

Contributors

inkimar avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

icingink inkimar

media-docker's Issues

Configure wildfly to receive large-files

  1. update standalone.xml with ( section undertow, http-listeners ) the attribute 'max-post-size="1048576000" '

Additional fix : eclipselink and module.xml
add the filter-section.

<resources>
        <resource-root path="jipijapa-eclipselink-1.0.1.Final.jar"/>
    <resource-root path="eclipselink-2.5.2.jar">
        <filter>
                    <exclude path="javax/**" />
            </filter>
    </resource-root> 
</resources>

increase heap for Wildfly:
från -Xms128m -Xmx512m till -Xms2048m -Xmx2048m

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.