Skip to content

Commit

Permalink
Merge pull request #10 from onurmercury/master
Browse files Browse the repository at this point in the history
Improve container support, switch to `pyrofork`
  • Loading branch information
ket0x4 authored Jun 15, 2024
2 parents 4b2ed72 + 7f8baa4 commit 699dfcb
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 19 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build & Push

on:
workflow_dispatch:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build & Push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v5
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/ketard-ai:latest
# ${{ secrets.DOCKERHUB_USERNAME }}/ketard-ai:latest
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM python:3-alpine

# Copy files and set working directory
COPY . /app
WORKDIR /app

# Install dependencies
RUN set -eux; \
apk add --no-cache \
build-base \
g++ gcc \
linux-headers \
musl-dev; \
pip install --no-cache-dir -Ur requirements.txt

# Set execution command
CMD ["python", "ketard.py"]
12 changes: 12 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
app:
container_name: ketard-ai
build:
context: .
dockerfile: Dockerfile
image: ghcr.io/ket0x4/ketard-ai:latest
restart: on-failure
volumes:
- type: bind
source: ./settings.json
target: /app/settings.json
16 changes: 0 additions & 16 deletions dockerfile

This file was deleted.

6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
asyncio
langchain_community
https://github.com/KurimuzonAkuma/pyrogram/archive/dev.zip
psutil
asyncio
TgCrypto
pyrofork
TgCrypto

0 comments on commit 699dfcb

Please sign in to comment.