-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9cc78a2
Showing
6 changed files
with
126 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Build and Publish Docker Image | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
schedule: | ||
- cron: "24 9 * * 6" | ||
workflow_dispatch: | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
IMAGE_TAG: ${{ github.sha }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout Dockerfile | ||
id: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup QEMU | ||
id: qemu | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
image: tonistiigi/binfmt:latest | ||
platforms: all | ||
|
||
- name: Setup Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
id: ghcr | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
flavor: | | ||
latest=${{ startsWith(github.ref, 'refs/heads/main') }} | ||
suffix=-${{ github.sha }} | ||
- name: Build and push main Docker image | ||
id: build | ||
uses: docker/build-push-action@v5 | ||
with: | ||
build-args: GH_TOKEN=${{ secrets.GH_TOKEN }} | ||
context: . | ||
file: ./Dockerfile | ||
platforms: linux/amd64,linux/arm64/v8 | ||
cache-to: type=gha,mode=max,ignore-error=true | ||
cache-from: type=gha | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM python:3.10-slim | ||
|
||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y --no-install-recommends curl gcc g++ git make && \ | ||
apt-get clean && \ | ||
apt-get autoremove -y && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
pip install langflow>=0.5.3 && \ | ||
pip cache purge && \ | ||
rm -rf /root/.cache/pip && \ | ||
useradd -m -u 1000 langflow && \ | ||
mkdir -p /home/langflow/app && \ | ||
chown -R langflow:langflow /home/langflow | ||
|
||
USER langflow | ||
|
||
ENV HOME=/home/langflow | ||
|
||
COPY --chown=langflow:langflow run.sh $HOME/app/run.sh | ||
|
||
WORKDIR $HOME/app | ||
|
||
ENTRYPOINT ["./run.sh"] | ||
|
||
HEALTHCHECK CMD curl --fail http://0.0.0.0:7860/ || exit 1 | ||
|
||
EXPOSE 7860 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||
Version 2, December 2004 | ||
|
||
Copyright (C) 2004 Sam Hocevar <[email protected]> | ||
|
||
Everyone is permitted to copy and distribute verbatim or modified | ||
copies of this license document, and changing it is allowed as long | ||
as the name is changed. | ||
|
||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
|
||
0. You just DO WHAT THE FUCK YOU WANT TO. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# TO-DO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
version: '3.8' | ||
services: | ||
langflow: | ||
image: Sideral-tech/langflow-docker:latest | ||
restart: unless-stopped | ||
ports: | ||
- 127.0.0.1:7860:7860 | ||
volumes: | ||
- /data/langflow/data:/home/langflow/.cache/langflow | ||
- /data/langflow/logs:/home/langflow/app/logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
langflow run \ | ||
--workers "$(nproc --all)" \ | ||
--host 0.0.0.0 \ | ||
--port 7860 |