diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 367c760..b1bc8b5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,7 @@ name: Deploy with Docker on: push: - branches: [ main, build/deploy-ec2 ] + branches: [ main, build/* ] env: DOCKER_IMAGE: ghcr.io/${{ github.actor }}/apap.ai diff --git a/README.md b/README.md index 6cf4d73..00063c0 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,49 @@ -# APAP-ai -한이음ICT-2024-APAP-ai +# APAP-AI + +This is a repository for an object detection inference API using `YOLOv5` and `FastAPI` + +This repository is used for 스마트해상물류 ICT project. + + +### Install +Dependencies are managed using `Poetry`. + +```shell + pip install poetry + poetry install +``` + +### Run +```shell +poetry run uvicorn --host=127.0.0.1 app.main:app +``` + +### Usage +Environment variables are managed through dotenv. + +The defined variables are referenced from the `.env` file in the root directory. + +### API Endpoints +Documentation is provided through `SwaggerUI`, which is built into `FastAPI` by default. + +```http request + http://localhost:8080/docs +``` + +### Test +```shell + poetry run pytest +``` + +### Deployment via GitHub Actions +The following variables need to be defined in the `Environment secrets`: + +| Variable | Description | +|----------------------|------------------------------------| +| GHCR_TOKEN | GitHub Container Registry Token | +| REMOTE_IP | Remote server IP | +| REMOTE_USER | Remote server user name | +| REMOTE_PRIVATE_KEY | Remote server private key | +| REMOTE_SSH_PORT | 22 | + +