diff --git a/.github/workflows/container-image.yml b/.github/workflows/container-image.yml new file mode 100644 index 0000000..3d4b5a7 --- /dev/null +++ b/.github/workflows/container-image.yml @@ -0,0 +1,31 @@ +name: Build and Push Container Image + +on: + push: + branches: + - main + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: ghcr.io/${{ github.repository_owner }}/arxivchatguru:${{ github.ref == 'refs/heads/main' && 'latest' || 'canary' }} diff --git a/Dockerfile b/Dockerfile index b7e5fcf..5d18119 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,11 @@ RUN apt-get update && apt-get install python-tk python3-tk tk-dev -y WORKDIR /app -COPY ./app/requirements.txt . +# Copy all files and subdirectories from ./app to /app in the image +COPY ./app /app RUN pip install -r requirements.txt -CMD ["streamlit", "run", "App.py", "--server.fileWatcherType", "none", "--browser.gatherUsageStats", "false","--server.enableXsrfProtection", "false", "--server.address", "0.0.0.0"] \ No newline at end of file +LABEL org.opencontainers.image.source https://github.com/RedisVentures/ArxivChatGuru + +CMD ["streamlit", "run", "app.py", "--server.fileWatcherType", "none", "--browser.gatherUsageStats", "false","--server.enableXsrfProtection", "false", "--server.address", "0.0.0.0"]