mirror of https://github.com/kortix-ai/suna.git
Merge pull request #484 from tnfssc/ci/remove-frtnd
This commit is contained in:
commit
c3cf5d25b3
|
@ -1,9 +1,10 @@
|
||||||
name: Build and Push Docker Images
|
name: Build and Push Docker Image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# Remove active triggers to disable the workflow
|
push:
|
||||||
# push:
|
branches:
|
||||||
# branches: [ main ]
|
- main
|
||||||
|
- PRODUCTION
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
|
@ -16,6 +17,18 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Get tag name
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [[ "${GITHUB_REF#refs/heads/}" == "main" ]]; then
|
||||||
|
echo "branch=latest" >> $GITHUB_OUTPUT
|
||||||
|
elif [[ "${GITHUB_REF#refs/heads/}" == "PRODUCTION" ]]; then
|
||||||
|
echo "branch=prod" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
id: get_tag_name
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
@ -32,16 +45,7 @@ jobs:
|
||||||
context: ./backend
|
context: ./backend
|
||||||
file: ./backend/Dockerfile
|
file: ./backend/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: ghcr.io/${{ github.repository }}/suna-backend:latest
|
platforms: linux/arm64, linux/amd64
|
||||||
cache-from: type=gha
|
tags: ghcr.io/${{ github.repository }}/suna-backend:${{ steps.get_tag_name.outputs.branch }}
|
||||||
cache-to: type=gha,mode=max
|
|
||||||
|
|
||||||
- name: Build and push Frontend image
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: ./frontend
|
|
||||||
file: ./frontend/Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: ghcr.io/${{ github.repository }}/suna-frontend:latest
|
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
|
@ -38,6 +38,8 @@ ENV WORKERS=33
|
||||||
ENV THREADS=2
|
ENV THREADS=2
|
||||||
ENV WORKER_CONNECTIONS=2000
|
ENV WORKER_CONNECTIONS=2000
|
||||||
|
|
||||||
|
EXPOSE 8000
|
||||||
|
|
||||||
# Gunicorn configuration
|
# Gunicorn configuration
|
||||||
CMD ["sh", "-c", "gunicorn api:app \
|
CMD ["sh", "-c", "gunicorn api:app \
|
||||||
--workers $WORKERS \
|
--workers $WORKERS \
|
||||||
|
|
Loading…
Reference in New Issue