Skip to content

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

License

Notifications You must be signed in to change notification settings

Bnei-Baruch/archive-unzip

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published