Skip to content


This repository deploys the API for bedbase. It will run these services:

  1. production API:
  2. dev API:

This repo will deploy a new service by following these steps:

  1. Build an image by packaging the bedhost image (from dockerhub) with the bbconf file in this repository.
  2. Push that image to AWS.
  3. Deploy it to yeti cluster with aws task def.

Build the container

Here we use the databio/bedhost container on dockerhub, and just add the configuration file in this repo to it, so build is super fast.

docker build -t databio/bedhost-configured -f Dockerfiles/primary.Dockerfile .

Or for dev:

docker build -t databio/bedhost-configured-dev -f Dockerfiles/dev1.Dockerfile .

Run it locally to test

First, source the .env file to set env vars in the calling environment. Then, use --env-file to pass those env vars through to the container

source environment/production.env
docker run --rm --network="host" \
  --env-file environment/docker.env \

Here's another example for running the container:

docker run --rm --init -p 8000:8000 --name bedstat-rest-server \
  --network="host" \
  --volume ~/code/ \
  --env-file ../ \
  --env BEDBASE_CONFIG=/bedbase.yaml \
  databio/bedhost  uvicorn bedhost.main:app --reload

Building the Amazon-tagged version

You could build and push to ECR like this if you need it... but the github action will do this for you.

Authenticate with AWS ECR:

aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin

Build/tag/push image:

docker build -t -f Dockerfiles/primary.Dockerfile .
docker push