File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ .git
2+ .github
3+ .gitignore
4+ .dockerignore
5+
6+ build /
7+ .gradle /
8+
9+ dashboards /
10+ alerting /
11+ * .yml
12+ ! build.gradle
13+ ! settings.gradle
14+
15+ README.md
16+ LICENSE
Original file line number Diff line number Diff line change @@ -17,10 +17,14 @@ RUN ./gradlew bootJar -x test --no-daemon
1717
1818FROM eclipse-temurin:21-jre-alpine
1919
20+ RUN addgroup -S appgroup && adduser -S appuser -G appgroup
21+
2022WORKDIR /app
2123
22- COPY --from=builder /app/build/libs/*.jar app.jar
24+ COPY --chown=appuser:appgroup --from=builder /app/build/libs/*.jar app.jar
25+
26+ USER appuser
2327
24- EXPOSE 8080
28+ EXPOSE 8080 9090
2529
2630ENTRYPOINT ["java" , "-jar" , "app.jar" ]
Original file line number Diff line number Diff line change @@ -13,4 +13,5 @@ datasources:
1313 type : loki
1414 uid : loki
1515 access : proxy
16- url : http://loki:3100
16+ url : http://loki:3100
17+ editable : true
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ services:
55 restart : unless-stopped
66 ports :
77 - " 8080:8080"
8- - " 9090:9090"
8+ - " 127.0.0.1: 9090:9090"
99 environment :
1010 SPRING_PROFILES_ACTIVE : prod
1111 DB_URL : jdbc:mysql://git-ranker-db:3306/${DB_NAME}?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Seoul
@@ -49,7 +49,7 @@ services:
4949 MYSQL_ROOT_PASSWORD : ${DB_ROOT_PASSWORD}
5050 TZ : Asia/Seoul
5151 ports :
52- - " 3306:3306"
52+ - " 127.0.0.1: 3306:3306"
5353 volumes :
5454 - mysql_data:/var/lib/mysql
5555 deploy :
@@ -73,12 +73,13 @@ services:
7373 - ./prometheus.yml:/etc/prometheus/prometheus.yml
7474 - prometheus_data:/prometheus
7575 ports :
76- - " 9091:9090"
76+ - " 127.0.0.1: 9091:9090"
7777 command :
7878 - ' --config.file=/etc/prometheus/prometheus.yml'
7979 - ' --storage.tsdb.path=/prometheus'
8080 - ' --web.console.libraries=/usr/share/prometheus/console_libraries'
8181 - ' --web.console.templates=/usr/share/prometheus/consoles'
82+ - ' --storage.tsdb.retention.time=30d'
8283 deploy :
8384 resources :
8485 limits :
@@ -94,7 +95,7 @@ services:
9495 container_name : git-ranker-loki
9596 restart : unless-stopped
9697 ports :
97- - " 3100:3100"
98+ - " 127.0.0.1: 3100:3100"
9899 volumes :
99100 - ./loki-config.yml:/etc/loki/local-config.yml
100101 - loki_data:/loki
Original file line number Diff line number Diff line change @@ -31,12 +31,19 @@ schema_config:
3131 prefix : index_
3232 period : 24h
3333
34+ compactor :
35+ working_directory : /loki/compactor
36+ retention_enabled : true
37+ compaction_interval : 10m
38+ delete_request_store : filesystem
39+
3440limits_config :
3541 allow_structured_metadata : true
3642 reject_old_samples : false
3743 reject_old_samples_max_age : 168h
3844 ingestion_rate_mb : 16
3945 ingestion_burst_size_mb : 32
46+ retention_period : 30d
4047
4148query_range :
4249 results_cache :
You can’t perform that action at this time.
0 commit comments