Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,6 @@ jobs:
mkdir -p $GITHUB_WORKSPACE/src/main/resources/key
echo "${{ secrets.FIREBASE_ADMIN_SDK_PRIVATE_KEY }}" | base64 --decode > $GITHUB_WORKSPACE/src/main/resources/key/firebase_admin_sdk_private_key.json

- name: Create fluent-bit.conf.template from Secrets
env:
LOKI_HTTP_USER: ${{ secrets.LOKI_HTTP_USER }}
LOKI_HTTP_PASSWD: ${{ secrets.LOKI_HTTP_PASSWD }}
LOKI_HOST: ${{ secrets.LOKI_HOST }}
LOKI_PORT: ${{ secrets.LOKI_PORT }}
LOKI_S3_BUCKET: ${{ secrets.LOG_S3_BUCKET }}
run: |
envsubst < fluent-bit/fluent-bit.conf.template > fluent-bit/fluent-bit.conf
sed -i 's/\\$/\$/g' fluent-bit/fluent-bit.conf

- name: Grant execute permission for gradlew
run: chmod +x gradlew

Expand All @@ -63,6 +52,10 @@ jobs:
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}

- name: Download fluent-bit.conf from S3
run: |
aws s3 cp s3://earlybird-fluent-bit-conf/fluent-bit.conf fluent-bit/fluent-bit.conf

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ src/main/resources/key/firebase_admin_sdk_private_key.json

logs/*.log

.env
.env
fluent-bit/fluent-bit.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@
Name loki
Match *
Labels job=ecs_fargate
label_keys \$container_name,\$ecs_task_definition,\$source,$ecs_cluster
label_keys $container_name,$ecs_task_definition,$source,$ecs_cluster
remove_keys container_id,ecs_task_arn
http_user ${LOKI_HTTP_USER}
http_passwd ${LOKI_HTTP_PASSWD}
host ${LOKI_HOST}
port ${LOKI_PORT}
http_user earlybird
http_passwd changetheworld
host earlybirdteam.com
port 56789
tls on
line_format key_value

[OUTPUT]
Name s3
Match *
bucket ${LOKI_S3_BUCKET}
bucket earlybird-spring-log
region ap-northeast-2
store_dir /tmp/fluent-bit/s3
compression gzip
Expand Down