artstore (think "artifact store") provides lightweight management of project artifacts to a directory hierarchy via REST api. The expectation is that this directory hierarchy is then served via an HTTP server (e.g. nginx).
- Python 3.9
- Flask
artstore.json is read at startup time with the following parameters:
base_path- Path to the root of the directory hierarchy managed by artstoretemp_path- Path to a temporary directory for storage of files which have been uploaded but not yet handled
projects.json holds configuration information for projects managed by artstore. A project has its own directory relative to base_path. A project can have one or more artifact "items" of various types. Each item has its own directory relative to the project's directory.
-
html- an.htmlfile (presumablyindex.html) can be uploaded to artstore and will be stored the item's directory -
tgz- a.tar.gzfile can be uploaded to artstore and will be extracted to the item's directory. It is assumed that the directory will include anindex.htmlfile. -
zip- a.zipfile can be uploaded to artstore and will be extracted to the item's directory. It is assumed that the directory will include anindex.htmlfile. -
TODO:
collection- a file can be uploaded to artstore and will be stored in the item's directory. The lastdepthartifact files in the item directory will be retained. Anindex.htmlfile will be regenerated for the item's directory with links to all artifact files. It is assumed that the filename will be unique (e.g. containing a version number).
The Dockerfile can be used to build a container image. The /etc/artstore directory should be mounted into the container, as state information is maintained there. The path to the directory hierarchy managed by artstore should be passed in as well.
The default.conf is a sample configuration file for /etc/nginx/conf.d which configures Nginx as a proxy for artstore (e.g. httpd://foo.com/artstore/ is proxied to the artstore service).
The following URIs are if the artstore service is run directly. If the service is run with nginx or some other proxy then the URIs would likely have some other prefix (for example I use artstore)
POST /<project>/<item> - upload a file with metadata for the specified project and item. Expected Content-Type header is multipart/form-data with key item
GET / - return list of projects
POST /<project> - add a project configured based on the json passed in the request (see above project configuration). Expected Content-Type header is application/json.
GET /<project> - get a project's current configuration
TODO: PUT /<project> - update a project's configuration - what would this do to existing artifacts?
DELETE /<project> - delete a project