Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/deploy-dockerhub-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build and push dev image to Dockerhub

on:
workflow_dispatch:
inputs: null

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and Push to DockerHub
uses: docker/build-push-action@v5
with:
push: true
file: deployment/dockerhub/dev.Dockerfile
tags: "databio/pephub:dev"
9 changes: 4 additions & 5 deletions .github/workflows/deploy-dockerhub.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: Deploy to Dockerhub on release

on:
release:
types:
- created
types: [published]
workflow_dispatch:
inputs: null

name: Deploy to Dockerhub on release

jobs:
deploy:
name: Deploy
Expand All @@ -28,5 +27,5 @@ jobs:
uses: docker/build-push-action@v5
with:
push: true
file: deployment/dockerhub/Dockerfile
file: deployment/dockerhub/primary.Dockerfile
tags: databio/pephub:latest, databio/pephub:${{ github.ref_name }}
22 changes: 22 additions & 0 deletions deployment/dockerhub/dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -------------
# BUILD BACKEND
# -------------
FROM python:3.10-slim
LABEL authors="Nathan LeRoy, Nathan Sheffield, Oleksandr Khoroshevskyi"

RUN apt-get update
RUN apt-get install -y gcc
RUN apt-get install -y libpq-dev
RUN apt-get install -y --no-install-recommends git

EXPOSE 5432
EXPOSE 6333
EXPOSE 80

WORKDIR /app
COPY . /app

RUN python -m pip install --upgrade pip
RUN pip install -r requirements/requirements-all.txt --no-cache-dir

CMD ["uvicorn", "pephub.main:app", "--host", "0.0.0.0", "--port", "80"]
Loading