diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..dbdb527 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,33 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - dev + pull_request: + branches: + - dev + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: shreym/insightful:latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0d7bd5b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM python:3.10-slim + +WORKDIR /app + +COPY . /app + +RUN pip install --no-cache-dir -r requirements.txt + +EXPOSE 8051 + +CMD ["streamlit", "run", "InSightful.py"] \ No newline at end of file