Skip to main content

Plastron HTTP web app

Project description

plastron-web

HTTP server for synchronous remote operations

Running with Python

As a Flask application:

flask --app plastron.web:create_app("/path/to/docker-plastron.yml") run

To enable debugging, for hot code reloading, set FLASK_DEBUG=1 either on the command line or in a .env file:

FLASK_DEBUG=1 flask --app plastron.web:create_app("/path/to/docker-plastron.yml") run

Using the console script entrypoint, which runs the application with the Waitress WSGI server:

plastrond-http

Docker Image

The plastron-stomp package contains a Dockerfile for building the plastrond-http Docker image.

Building

Important: This image MUST be built from the main plastron project directory, in order to include the other plastron packages in the build context.

docker build -t docker.lib.umd.edu/plastrond-http:latest \
    -f plastron-web/Dockerfile .

Running with Docker Swarm

This repository contains a compose.yml file that defines part of a plastrond Docker stack intended to be run alongside the umd-fcrepo-docker stack. This repository's configuration adds a plastrond-http container.

# if you are not already running in swarm mode
docker swarm init

# build the image
docker build -t docker.lib.umd.edu/plastrond-http:latest \
    -f plastron-web/Dockerfile .

# Copy the docker-plastron-template.yml and edit the configuration
cp docker-plastron.template.yml docker-plastron.yml
vim docker-plastron.yml

# deploy the stack to run the HTTP webapp
docker stack deploy -c plastron-web/compose.yml plastrond

To watch the logs:

docker service logs -f plastrond_http

To stop the HTTP service:

docker service rm plastrond_http

Configuration

The application is configured through environment variables.

Name Value Default
JOBS_DIR Root directory for storing job information jobs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plastron_web-4.5.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

plastron_web-4.5.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file plastron_web-4.5.0.tar.gz.

File metadata

  • Download URL: plastron_web-4.5.0.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for plastron_web-4.5.0.tar.gz
Algorithm Hash digest
SHA256 ef0e34064eb93cac09d79c3ced46f79e4bc638ca4119594a34ecd7ab7ad5a7cc
MD5 6872cb695107bafe8668461ade495426
BLAKE2b-256 25c060b54a70902e076c20b88dec94b9adc525b1d8ad9a3780420be35d17ecbd

See more details on using hashes here.

File details

Details for the file plastron_web-4.5.0-py3-none-any.whl.

File metadata

  • Download URL: plastron_web-4.5.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for plastron_web-4.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4fa098798ec5543a05a925391bae39dac66cfcd57af768e17d36156ac72098e9
MD5 b50d942f456cd1ada3e28ce1dc5086d2
BLAKE2b-256 2f96f04dd6f2d0ff9aaa8bbe61b66477cd4108f17bb6dd5ca1271efb5cc55b77

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page