Skip to content

Commit

Permalink
Fix env
Browse files Browse the repository at this point in the history
  • Loading branch information
k0kishima committed Aug 17, 2024
1 parent 16b6212 commit 88148ef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ jobs:
file: ./deploy/nuxt/Dockerfile
push: true
tags: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/realworld-example-staging-frontend-app-ecr-repo:latest
build-args: |
API_BASE_URL=${{ secrets.API_BASE_URL }}
- name: Render task definition from template
id: render-task-def
Expand All @@ -60,7 +62,6 @@ jobs:
APP_IMAGE_URI: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/realworld-example-staging-frontend-app-ecr-repo:latest
PROJECT: realworld-example
APP_ENV: staging
API_BASE_URL: ${{ secrets.API_BASE_URL }}

- name: Register ECS task definition
id: register-task-def
Expand Down
2 changes: 2 additions & 0 deletions deploy/nuxt/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ FROM node:16-alpine
WORKDIR /app
COPY . .
RUN npm install
ARG API_BASE_URL
RUN echo "API_BASE_URL=${API_BASE_URL}" > .env
RUN npm run build
CMD ["npm", "start"]
8 changes: 1 addition & 7 deletions deploy/taskdef-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,7 @@
"awslogs-region": "ap-northeast-1",
"awslogs-stream-prefix": "frontend-app"
}
},
"environment": [
{
"name": "API_BASE_URL",
"value": "${API_BASE_URL}"
}
]
}
}
]
}

0 comments on commit 88148ef

Please sign in to comment.