- Make virtual environment:
By default, the dependencies are managed with Poetry, go there and install it.
You can install all the dependencies with:
$ poetry install- Activate virtual environment:
Then you can start a shell session with the new environment with:
$ poetry shellMake sure your editor is using the correct Python virtual environment.
- Create your own
.envfile based on the template.env.example
- Start the stack with Docker Compose:
docker compose up -d- Initialize alembic migrations:
alembic upgrade head- Starting application:
py main.py- Create Docker container:
DOCKER_BUILDKIT=1 docker build --rm . -t photoshare:latest- Run Docker container:
docker run -d --name photoshare --env-file ./.env -p 8000:8000 photoshare:latestThe application will get started in http://127.0.0.1:8000
Swagger Documentation: http://127.0.0.1:8000/docs
Redoc Documentation: http://127.0.0.1:8000/redoc
For run tests
pytestFor run tests with coverage report
pytest --cov=app tests