From 9a04cac86c642f1000df0aa66220a922d223643a Mon Sep 17 00:00:00 2001 From: Remy Moll Date: Sat, 25 May 2024 13:32:53 +0200 Subject: [PATCH] first try of automated docker builds --- .gitea/workflows/backed_build-image.yaml | 30 ++++++++++++++++++++++++ backend/Dockerfile | 4 ++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 .gitea/workflows/backed_build-image.yaml diff --git a/.gitea/workflows/backed_build-image.yaml b/.gitea/workflows/backed_build-image.yaml new file mode 100644 index 0000000..9f062e5 --- /dev/null +++ b/.gitea/workflows/backed_build-image.yaml @@ -0,0 +1,30 @@ +on: + pull_request: + branches: + - main + +name: Build and push docker image + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + + - uses: https://gitea.com/actions/checkout@v4 + + - name: Login to Docker Registry + uses: docker/login-action@v3 + with: + registry: git.kluster.moll.re + username: ${{ gitea.repository_owner }} + password: ${{ secrets.GITEA_TOKEN}} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: backend + tags: git.kluster.moll.re/renoll/fast_network_navigation/backend:latest diff --git a/backend/Dockerfile b/backend/Dockerfile index 1535818..79dbe76 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,10 +1,10 @@ FROM python:3 WORKDIR /app -COPY Pipfile Pipfile.lock /app/ +COPY Pipfile Pipfile.lock . RUN pip install pipenv -RUN pipenv install --deploy --ignore-pipfile +RUN pipenv install --deploy --system COPY . /src