Skip to content

Commit

Permalink
chore - docker file args
Browse files Browse the repository at this point in the history
  • Loading branch information
jaga-live committed Sep 24, 2023
1 parent c20265d commit 2f987cc
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
environment: Development
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v2
Expand All @@ -26,7 +26,13 @@ jobs:

- name: Build Docker image
run: |
docker build -t jagalive/kittychan-events:${{ github.sha }} .
docker build \
--build-arg KITTY_CHAN_TOKEN=${{ secrets.KITTY_CHAN_TOKEN }} \
--build-arg KITTY_CHAN_ID=${{ secrets.KITTY_CHAN_ID }} \
--build-arg KITTY_CHAN_GRPC_URL=${{ secrets.KITTY_CHAN_GRPC_URL }} \
--build-arg REDIS_HOST=${{ secrets.REDIS_HOST }} \
--build-arg REDIS_PASS=${{ secrets.REDIS_PASS }} \
-t jagalive/kittychan-events:${{ github.sha }} .
docker tag jagalive/kittychan-events:${{ github.sha }} jagalive/kittychan-events:latest
working-directory: ./

Expand Down
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@ FROM node:16-alpine
WORKDIR /usr/src/kittychan_events
COPY package.json .
RUN npm install -g typescript cpx

ARG KITTY_CHAN_TOKEN
ENV KITTY_CHAN_TOKEN $KITTY_CHAN_TOKEN

ARG KITTY_CHAN_ID
ENV KITTY_CHAN_ID $KITTY_CHAN_ID

ARG KITTY_CHAN_GRPC_IRL
ENV KITTY_CHAN_GRPC_IRL $KITTY_CHAN_GRPC_IRL

ARG REDIS_HOST
ENV REDIS_HOST $REDIS_HOST

ARG REDIS_PASS
ENV REDIS_PASS $REDIS_PASS

RUN npm install
COPY . .
RUN tsc
Expand Down

0 comments on commit 2f987cc

Please sign in to comment.