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
22 changes: 21 additions & 1 deletion .github/workflows/deploy-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
source: "docker/production/promtail-config.yml"
target: "~/app"

- name: Copy promtail-config to EC2
- name: Copy agent-config to EC2
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.SERVER_HOST }}
Expand All @@ -89,6 +89,26 @@ jobs:
target: "~/app"
overwrite: true

- name: Copy application-production.yml to EC2
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.SERVER_HOST }}
username: ubuntu
key: ${{ secrets.SERVER_SSH_KEY }}
source: "apps/user-service/src/main/resources/application-production.yml"
target: "~/app/docker/production/config/application-production.yml"
overwrite: true

- name: Copy log4j2-production.yml to EC2
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.SERVER_HOST }}
username: ubuntu
key: ${{ secrets.SERVER_SSH_KEY }}
source: "apps/user-service/src/main/resources/log4j2-production.yml"
target: "~/app/docker/production/config/log4j2-production.yml"
overwrite: true

- name: Deploy on EC2
uses: appleboy/ssh-action@v1.0.3
with:
Expand Down
7 changes: 7 additions & 0 deletions apps/user-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ bootJar {
from ("${asciidoctor.outputDir}/html5") {
into 'static/docs'
}

// 프로덕션 JAR에서 불필요한 파일들 제외
exclude 'application-test-*.yml'
exclude 'log4j2-test-*.yml'
exclude 'application-develop.yml'
exclude 'log4j2-develop.yml'
exclude 'sql/**'
}

spotless {
Expand Down
1 change: 1 addition & 0 deletions apps/user-service/src/main/resources/log4j2-production.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Configuration:
status: INFO
name: production
monitorInterval: 30

properties:
property:
Expand Down
1 change: 1 addition & 0 deletions docker/production/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ services:
- SPRING_PROFILES_ACTIVE=production
volumes:
- logs_volume:/logs
- ./config:/app/config:ro

# Grafana Agent만으로 메트릭 수집 + 전송
grafana-agent:
Expand Down
Loading