Skip to content

Commit

Permalink
Updated Project
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsigaras committed Nov 11, 2020
1 parent d8c8cb3 commit 9842c70
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 144 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# Files to exclude during docker build
azuredeploy.json.template
49 changes: 29 additions & 20 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,10 @@ env:
IMAGE_NAME: beacon

jobs:
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Run tests
run: |
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
docker build . --file Dockerfile
fi

# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
push:
# Ensure test job passes before pushing image.
needs: test

runs-on: ubuntu-latest
if: github.event_name == 'push'
Expand All @@ -51,8 +33,7 @@ jobs:
run: docker build . --file Dockerfile --tag $IMAGE_NAME

- name: Log into GitHub Container Registry
# TODO: Create a PAT with `read:packages` and `write:packages` scopes and save it as an Actions secret `CR_PAT`
run: echo "${{ secrets.CR_PAT }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
run: echo "${{ secrets.GHCR_TOKEN }}" | docker login https://ghcr.io -u ${{ secrets.GHCR_SVC_ACCOUNT }} --password-stdin

- name: Push image to GitHub Container Registry
run: |
Expand All @@ -75,3 +56,31 @@ jobs:
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
- name: Login to EIPM DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.EIPM_DOCKER_HUB_USERNAME }}
password: ${{ secrets.EIPM_DOCKER_HUB_TOKEN }}

- name: Push image to EIPM Docker Hub
run: |
IMAGE_ID=eipm/$IMAGE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Use Docker `latest` tag convention
[ "$VERSION" == "main" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
16 changes: 9 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
# Dockerfile for Beacon
FROM python:2.7.16-stretch
FROM python:2.7.18-buster
#=====================#
# Setup Prerequisites #
#=====================#
RUN apt-get update && apt-get install -y \
apache2 \
git \
vim \
apache2 \
git \
vim \
&& a2enmod cgi \
&& service apache2 restart \
&& rm -rf /var/lib/apt/lists/*
#===============================#
# Docker Image Configuration #
#===============================#
LABEL Description='Beacon' \
LABEL org.opencontainers.image.source='https://github.com/eipm/beacon' \
Description='Beacon' \
Vendor='Englander Institute for Precision Medicine' \
maintainer='[email protected]'
maintainer='[email protected]' \
base_image='python' \
base_image_version='2.7.18-buster'
#=====================#
# Install Beacon #
#=====================#
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Elemento Lab
Copyright (c) 2020 Englander Institute for Precision Medicine

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
# Beacon

[![Docker Automated build](https://img.shields.io/docker/automated/jrottenberg/ffmpeg.svg)](https://hub.docker.com/r/eipm/beacon/) [![Docker Pulls](https://img.shields.io/docker/pulls/eipm/beacon.svg)](https://hub.docker.com/r/eipm/beacon/) [![Docker Stars](https://img.shields.io/docker/stars/eipm/beacon.svg)](https://hub.docker.com/r/eipm/beacon/)
[![Maintainability](https://api.codeclimate.com/v1/badges/b3607af6a3051d8df2eb/maintainability)](https://codeclimate.com/github/eipm/beacon/maintainability)
[![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://azuredeploy.net/)
[![Actions Status](https://github.com/eipm/beacon/workflows/Docker/badge.svg)](https://github.com/eipm/beacon/actions) [![Github](https://img.shields.io/badge/github-1.0.0-green?style=flat&logo=github)](https://github.com/eipm/beacon) [![EIPM Docker Hub](https://img.shields.io/badge/EIPM%20docker%20hub-1.0.0-blue?style=flat&logo=docker)](https://hub.docker.com/repository/docker/eipm/beacon) [![CGEN Docker Hub](https://img.shields.io/badge/CGEN%20docker%20hub-1.0.0-blue?style=flat&logo=docker)](https://hub.docker.com/repository/docker/cgen/beacon) [![GitHub Container Registry](https://img.shields.io/badge/GitHub%20Container%20Registry-1.0.0-blue?style=flat&logo=docker)](https://github.com/orgs/eipm/packages/container/package/beacon) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Supported tags and respective `Dockerfile` links

- [`latest` (*latest/Dockerfile*)](https://github.com/eipm/beacon/blob/master/Dockerfile)
- [`1.0.0` (*1.0.0/Dockerfile*)](https://github.com/eipm/beacon/blob/1d12dba679b013b8f4a679f492d8f29906b7d678/Dockerfile)
- [`latest` (*latest/Dockerfile*)](/Dockerfile)

## Introduction

This project is an open source dockerized automated build implementation of the GA4GH Beacon, enabling researchers to light their own beacon with a single command line.

- [Github Project](https://github.com/eipm/beacon)
- [Docker Automated Build](https://hub.docker.com/r/eipm/beacon/)

## About Beacon

The Beacon Project is a simple, open web service that balances the desire of international sites to share genomic data with the need for data protection. Beacons can be implemented by any institution and enable users to determine whether a database contains a genetic variant of interest. Queries such as, "Do you have any genomes with an 'A' at position 100,735 on chromosome 3" (or similar data) are met with either "Yes" or "No.” The Beacon Network — the collection of all organizations that have “lit" beacons — can be queried using the Beacon API or a web-based search engine to determine which, if any, sites have a variant of interest.
Expand Down Expand Up @@ -82,4 +76,4 @@ docker run -it --name beacon \
cd /var/www/html/beacon/ucscBeacon/; ./query GRCh37 ipm /data/*;
```

### [Learn more about supported data formats](https://github.com/maximilianh/ucscBeacon#adding-your-own-data)
### [Learn more about supported data formats](https://github.com/maximilianh/ucscBeacon#adding-your-own-data)
106 changes: 0 additions & 106 deletions azuredeploy.json.template

This file was deleted.

0 comments on commit 9842c70

Please sign in to comment.