From 69dc34ce9e3662f9a4ccbe4009db7b328d965314 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 29 Oct 2023 11:26:48 +0100 Subject: [PATCH] fix env variables --- .github/workflows/build-backend.yml | 2 ++ backend/Dockerfile | 11 +++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-backend.yml b/.github/workflows/build-backend.yml index 372eab3..b7119cd 100644 --- a/.github/workflows/build-backend.yml +++ b/.github/workflows/build-backend.yml @@ -42,5 +42,7 @@ jobs: context: ./backend platforms: linux/amd64,linux/arm64 push: true + build-args: | + "API_AUTH_TOKEN=${{ secrets.API_AUTH_TOKEN }}" tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/backend/Dockerfile b/backend/Dockerfile index 6004aef..bfea80f 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,13 +1,16 @@ FROM python:3-alpine FROM python:3 +ARG API_AUTH_TOKEN +ENV authorization ${API_AUTH_TOKEN} + WORKDIR /app - + COPY requirements.txt ./ - + RUN pip install -r requirements.txt - + COPY . . - + EXPOSE 5000 CMD [ "flask", "run","--host","0.0.0.0","--port","5000"]