Skip to content

Commit 972a06e

Browse files
committed
move env to dockerfile
1 parent 5f88dd1 commit 972a06e

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎.github/workflows/cd.yml‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ on:
77

88
env:
99
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
10-
BASE_API_URL: ${{ secrets.BASE_API_URL }}
11-
BASE_SOCKET_URL: ${{ secrets.BASE_SOCKET_URL }}
1210

1311
jobs:
1412
cd:
@@ -22,7 +20,7 @@ jobs:
2220
curl https://cli-assets.heroku.com/install-ubuntu.sh | sh
2321
heroku container:login
2422
- name: Build docker image
25-
run: docker build -t registry.heroku.com/${{ secrets.HEROKU_APP_NAME }}/web .
23+
run: docker build --build-arg BASE_API_URL=${{ secrets.BASE_API_URL }} --build-arg BASE_SOCKET_URL=${{ secrets.BASE_SOCKET_URL }} -t registry.heroku.com/${{ secrets.HEROKU_APP_NAME }}/web .
2624
- name: Deploy docker image
2725
run: docker push registry.heroku.com/${{ secrets.HEROKU_APP_NAME }}/web
2826
- name: Release

‎Dockerfile‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ WORKDIR /usr/app
44

55
# Build front
66
FROM base AS build-frontend
7+
ARG BASE_API_URL
8+
ENV BASE_API_URL=$BASE_API_URL
9+
ARG BASE_SOCKET_URL
10+
ENV BASE_SOCKET_URL=$BASE_SOCKET_URL
711
COPY ./front ./
812
RUN npm install
913
RUN npm run build

0 commit comments

Comments
 (0)