Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
Docker compose to setup new UI (#379)
LawyZhengf13dffb3efb2
diff --git a/.dockerignore b/.dockerignoreindex ef464e25f..d1e1d2a71 100644--- a/.dockerignore+++ b/.dockerignore@@ -16,6 +16,11 @@docsimages+# Front+skyvern-frontend/.env*+skyvern-frontend/dist+skyvern-frontend/node_modules+.dockerignore.gitignoreDockerfile\ No newline at end of filediff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.ymlindex f8bbb83a3..5440eb679 100644--- a/.github/workflows/build-docker-image.yml+++ b/.github/workflows/build-docker-image.yml@@ -6,8 +6,9 @@ on:env:AWS_REGION: us-east-1- ECR_REPOSITORY: skyvern- REGISTRY_ALIAS: t6d4b5t4 # skyvern+ ECR_BACKEND_REPOSITORY: skyvern+ ECR_UI_REPOSITORY: skyvern-ui+ REGISTRY_ALIAS: skyvern # t6d4b5t4jobs:run-ci:@@ -36,7 +37,7 @@ jobs:- name: Set up Docker Buildxuses: docker/setup-buildx-action@v1- - name: Build, tag, and push image to Amazon Public ECR+ - name: Build, tag, and push backend image to Amazon Public ECRid: build-imageuses: docker/build-push-action@v2env:@@ -48,6 +49,23 @@ jobs:linux/arm64push: truetags: |- ${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_REPOSITORY }}:${{ github.sha }}- ${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_REPOSITORY }}:${{ github.event.release.tag_name }}- ${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_REPOSITORY }}:latest+ ${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_BACKEND_REPOSITORY }}:${{ github.sha }}+ ${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_BACKEND_REPOSITORY }}:${{ github.event.release.tag_name }}+ ${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_BACKEND_REPOSITORY }}:latest++ - name: Build, tag, and push ui image to Amazon Public ECR+ id: build-ui-image+ uses: docker/build-push-action@v2+ env:+ ECR_REGISTRY: ${{ steps.login-ecr-public.outputs.registry }}+ with:+ context: .+ file: Dockerfile.ui+ platforms: |+ linux/amd64+ linux/arm64+ push: true+ tags: |+ ${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_UI_REPOSITORY }}:${{ github.sha }}+ ${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_UI_REPOSITORY }}:${{ github.event.release.tag_name }}+ ${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_UI_REPOSITORY }}:latestdiff --git a/Dockerfile.ui b/Dockerfile.uinew file mode 100644index 000000000..9f887a3f3--- /dev/null+++ b/Dockerfile.ui@@ -0,0 +1,12 @@+FROM node:20.12-slim++WORKDIR /app+COPY ./skyvern-frontend /app+COPY ./entrypoint-skyvernui.sh /app/entrypoint-skyvernui.sh+RUN npm install++ENV VITE_API_BASE_URL=http://localhost:8000/api/v1+ENV VITE_ARTIFACT_API_BASE_URL=http://localhost:9090++CMD [ "/bin/bash", "/app/entrypoint-skyvernui.sh" ]+diff --git a/docker-compose.yml b/docker-compose.ymlindex a2e8c8e34..25e85dd48 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -3,6 +3,7 @@ version: '3.8'services:postgres:image: postgres:14-alpine+ restart: always# comment out if you want to externally connect DB# ports:# - 5432:5432@@ -20,11 +21,11 @@ services:retries: 5skyvern:- image: public.ecr.aws/t6d4b5t4/skyvern:latest+ image: public.ecr.aws/skyvern/skyvern:latestrestart: on-failure# comment out if you want to externally call skyvern API- # ports:- # - 8000:8000+ ports:+ - 8000:8000volumes:- ./artifacts:/data/artifacts- ./videos:/data/videos@@ -40,7 +41,7 @@ services:# - LLM_KEY=ANTHROPIC_CLAUDE3_OPUS# - ANTHROPIC_API_KEY=<your_anthropic_key># - ENABLE_AZURE=true- # - LLM_KEY=AZURE_OPENAI_GPT4V+ # - LLM_KEY=AZURE_OPENAI# - AZURE_DEPLOYMENT=<your_azure_deployment># - AZURE_API_KEY=<your_azure_api_key># - AZURE_API_BASE=<your_azure_api_base>@@ -53,9 +54,27 @@ services:interval: 5stimeout: 5sretries: 5++ skyvern-ui:+ image: public.ecr.aws/skyvern/skyvern-ui:latest+ restart: on-failure+ ports:+ - 8080:8080+ - 9090:9090+ volumes:+ - ./artifacts:/data/artifacts+ - ./videos:/data/videos+ - ./har:/data/har+ - ./.streamlit:/app/.streamlit+ # environment:+ # - VITE_API_BASE_URL=+ # - VITE_SKYVERN_API_KEY=+ depends_on:+ skyvern:+ condition: service_healthystreamlit:- image: public.ecr.aws/t6d4b5t4/skyvern:latest+ image: public.ecr.aws/skyvern/skyvern:latestrestart: on-failureports:- 8501:8501diff --git a/entrypoint-skyvernui.sh b/entrypoint-skyvernui.shnew file mode 100644index 000000000..348ed9a1a--- /dev/null+++ b/entrypoint-skyvernui.sh@@ -0,0 +1,11 @@++#!/bin/bash++set -e++# setting api key+export VITE_SKYVERN_API_KEY=$(sed -n 's/.*cred\s*=\s*"\([^"]*\)".*/\1/p' .streamlit/secrets.toml)++npm run start++