Coder Social home page Coder Social logo

bnei-baruch / archive-unzip Goto Github PK

View Code? Open in Web Editor NEW
2.0 12.0 1.0 615 KB

Standalone service to unzip and serve contents of zip files in archive site

License: MIT License

Python 74.85% Shell 5.85% Dockerfile 3.60% HTML 2.19% JavaScript 13.35% SCSS 0.17%

archive-unzip's Introduction

Dev Env Setup

For first time, this one is enough. It takes some time as we have large dependencies and we load MDB dump.

docker-compose up -d

In PyCharm, we have to create a remote interpreter of type docker-compose for service 'app'.

For debugging, use a 'Flask' run configuration and don't forget to set --host=0.0.0.0 in "Additional options"

Docker installation

Build the image with:

docker build -t archive-unzip:latest .

run the image with:

docker run --network host --env MDB_URL='postgres://user:password@host/mdb?sslmode=disable' archive-unzip

Important the MDB_URL host must accessible from within the container.

The app should now be ready on port 5000 !

Dependencies

ffmpeg is installed from sources according to https://trac.ffmpeg.org/wiki/CompilationGuide/Centos

See ./misc/instal_ffmpeg.sh

API

Request

http://127.0.0.1:5000/uid/[uid]

Response Example

Success

response code: 200

[
  {
    "path": "[local relative path]",
    "size": "[size in bytes]"
  },
  {
    "path": "target/assets/sketches/2mCaPnNc/heb_o_rav_2017-10-03_lesson_bs-pticha_n1_p2_pic01.jpg",
    "size": 308258
  }
]
Error

response code: 400

{"error": "[error message]"}

License

MIT

archive-unzip's People

Contributors

edoshor avatar davgur avatar yosefy avatar berkovid avatar bbfsdev avatar

Stargazers

Димыч avatar  avatar

Watchers

Rami Grossman avatar Gregory Shilin avatar vshiray avatar  avatar James Cloos avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

yosefy

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.