This repository contains:
- Sequence collections API software (the
seqcolapi
package). This package is based on therefget
package. It simply provides an wrapper to implement the Sequence Collections API. - Configuration and GitHub Actions for demo server instance (servers subfolder).
To run a local server with a local database:
source servers/localhost/dev_local.env
uvicorn seqcolapi.main:app --reload --port 8100
To run a local server with the production database:
source servers/seqcolapi.databio.org/production.env
uvicorn seqcolapi.main:app --reload --port 8100
To build the docker file:
docker build --no-cache -t scim .
To run in a container:
export POSTGRES_PASSWORD=`pass aws/rds_postgres`
docker run --rm -p 8000:8000 --name sccon \
--env "POSTGRES_PASSWORD" \
--volume $CODE/seqcolapi.databio.org/config/seqcolapi.yaml:/config.yaml \
scim seqcolapi serve -c /config.yaml -p 8000
To deploy container to dockerhub:
Use github action in this repo which deploys on release, or through manual dispatch.
Left to do:
- it already retrieves from a refget server.
- let me insert stuff using only checksums.
- make it take 2 refget servers correctly.
cd analysis
source ../servers/localhost/dev_local.env
ipython3
Now run load_fasta.py
Build the seqcolapi image
cd
docker build -t docker.io/databio/seqcolapi:latest .
docker pull docker.io/databio/seqcolapi:latest
cd servers/seqcolapi.databio.org
docker build -t scim .
docker run \
-e POSTGRES_HOST=$POSTGRES_HOST \
-e POSTGRES_PASSWORD=$POSTGRES_PASSWORD \
--network=host \
scim
To upgrade the software:
Use config file located in /servers/seqcolapi.databio.org
. This will use the image in docker.io://databio/seqcolapi, github repo: refgenie/seqcolapi as base, bundle it with the above config, and deploy to the shefflab ECS.