Skip to content

Latest commit

 

History

History
76 lines (48 loc) · 1.67 KB

File metadata and controls

76 lines (48 loc) · 1.67 KB

SharingHub Server

Table of contents

Environment setup

Python 3.11 required.

Setup the environment:

python3 -mvenv .venv
source .venv/bin/activate
pip install -e .[dev]

Install the pre-commit hooks:

pre-commit install --install-hooks

Development

Lint

The linting is managed by pre-commit, but you can run it with:

pre-commit run --all-files

Run with uvicorn

We use python-dotenv, if a .env file is present it will be loaded. You can copy the .env.template as .env, and complete it to have a quick env setup done.

Other configuration values may be overridden, the .env file is not git-tracked in this repo so don't hesitate to twist the configuration when you want to test things.

Then run the development server:

uvicorn app.main:app --reload

Run with docker container

Build image

docker build . -t sharinghub-server:latest --build-arg VERSION=$(git rev-parse --short HEAD)

Use it

docker run --rm --env-file .env -p 8000:8000 --name sharinghub-server sharinghub-server:latest

You can check the API docs at localhost:8000/api/docs.

Configuration

Please check CONFIGURATION.md.

Copyright and License

Copyright 2024 CS GROUP - France

SharingHub Server is an open source software, distributed under the Apache License 2.0. See the LICENSE file for more information.