Skip to content

Commit

Permalink
Setup docker
Browse files Browse the repository at this point in the history
Signed-off-by: Dylan Schultz <[email protected]>
  • Loading branch information
dylanschultzie committed Mar 29, 2024
1 parent 47d8f12 commit 20aeee0
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Deploy Docker

on:
push:
branches:
- "master"

jobs:
docker:
name: Create and push Docker image
runs-on: ubuntu-latest
steps:
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
lavender5/ethereum_health_checker
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ FROM python:3.12-slim

WORKDIR /app

ENV POETRY_VERSION=1.7.0 \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_HOME="/opt/poetry"

RUN pip install "poetry==$POETRY_VERSION" && poetry --version

COPY pyproject.toml poetry.lock /app/
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: '3'
services:
app:
image: lavender5/ethereum_health_checker:latest
container_name: eth_health
restart: unless-stopped
env_file:
- ".env"
ports:
- "53336:53336"

0 comments on commit 20aeee0

Please sign in to comment.