From d416aa66b2a53c8a49ba66c36bd527a030431697 Mon Sep 17 00:00:00 2001 From: n-y-kim Date: Fri, 15 Mar 2024 07:33:33 +0900 Subject: [PATCH] Update workflow to use kubelogin & linux dockerfile --- .github/workflows/app.yaml | 2 ++ app/Dockerfile | 7 +++++-- app/start-dev.sh | 2 +- app/start-prod.sh | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/app.yaml b/.github/workflows/app.yaml index 8702e734..56badab7 100644 --- a/.github/workflows/app.yaml +++ b/.github/workflows/app.yaml @@ -42,6 +42,8 @@ jobs: with: resource-group: '${{ secrets.RESOURCE_GROUP }}' cluster-name: '${{ secrets.CLUSTER_NAME }}' + admin: 'false' + use-kubelogin: 'true' - name: Setup kubectl id: install-kubectl diff --git a/app/Dockerfile b/app/Dockerfile index 5259ab59..e8c2b9b0 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -1,4 +1,4 @@ -FROM nikolaik/python-nodejs:python3.10-nodejs21 +FROM --platform=linux/amd64 nikolaik/python-nodejs:python3.10-nodejs21 # Set the working directory WORKDIR /app @@ -6,6 +6,9 @@ WORKDIR /app # Copy your application code to the container COPY . . +# Install bash +RUN apt-get update && apt-get install -y bash + # Install dependencies RUN cd frontend && npm install && cd .. @@ -13,4 +16,4 @@ RUN cd frontend && npm install && cd .. RUN cd backend && python3 -m pip install -r requirements.txt && cd .. # Start your application -CMD [ "source" "start-prod.sh" ] \ No newline at end of file +CMD ["/bin/bash", "-c", "source start-dev.sh"] \ No newline at end of file diff --git a/app/start-dev.sh b/app/start-dev.sh index 1de0e2e2..abfc5ae0 100644 --- a/app/start-dev.sh +++ b/app/start-dev.sh @@ -2,7 +2,7 @@ source .env # Activate virtual environment -source ../venv/bin/activate +# source venv/bin/activate # Run frontend cd frontend diff --git a/app/start-prod.sh b/app/start-prod.sh index fa790ee6..a26ac957 100644 --- a/app/start-prod.sh +++ b/app/start-prod.sh @@ -2,7 +2,7 @@ source .env # Activate virtual environment -source ../venv/bin/activate +# source venv/bin/activate # Run frontend cd frontend