Skip to content

Commit

Permalink
build: Add db port env
Browse files Browse the repository at this point in the history
  • Loading branch information
GoGiants1 committed Oct 18, 2023
1 parent 955d04f commit cc3035f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/ecr-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ jobs:
# be deployed to ECS.
docker build --platform linux/amd64 -t $ECR_REGISTRY/$ECR_REPOSITORY_K8S:$IMAGE_TAG . \
--build-arg DB_HOST=${{ secrets.DB_HOST_DEV }} \
--build-arg DB_PORT=${{ secrets.DB_PORT }} \
--build-arg DB_NAME=${{ secrets.DB_NAME_DEV }} \
--build-arg DB_USER=${{ secrets.DB_USER_DEV }} \
--build-arg DB_PASSWORD=${{ secrets.DB_PASSWORD_DEV }} \
--build-arg SLACK_TOKEN=${{ secrets.SLACK_TOKEN }} \
--build-arg SLACK_TOKEN=${{ secrets.SLACK_TOKEN }} \
--build-arg SLACK_CHANNEL=${{ secrets.SLACK_CHANNEL_DEV }}
docker push $ECR_REGISTRY/$ECR_REPOSITORY_K8S:$IMAGE_TAG
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ecr-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
# be deployed to ECS.
docker build --platform linux/amd64 -t $ECR_REGISTRY/$ECR_REPOSITORY_K8S:$IMAGE_TAG . \
--build-arg DB_HOST=${{ secrets.DB_HOST }} \
--build-arg DB_PORT=${{ secrets.DB_PORT }} \
--build-arg DB_NAME=${{ secrets.DB_NAME }} \
--build-arg DB_USER=${{ secrets.DB_USER }} \
--build-arg DB_PASSWORD=${{ secrets.DB_PASSWORD }} \
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ RUN poetry install --without dev
FROM python-base AS runtime

ARG DB_HOST
ARG DB_PORT
ARG DB_NAME
ARG DB_USER
ARG DB_PASSWORD
ARG SLACK_TOKEN
ARG SLACK_CHANNEL

ENV DB_HOST=$DB_HOST \
DB_PORT=$DB_PORT \
DB_NAME=$DB_NAME \
DB_USER=$DB_USER \
DB_PASSWORD=$DB_PASSWORD \
Expand Down

0 comments on commit cc3035f

Please sign in to comment.