Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Toto-hitori committed Apr 24, 2024
2 parents daa2b1d + 3b20f67 commit e37ad64
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ datasources:
type: prometheus
access: proxy
orgId: 1
url: http://prometheus:9090
url: http://20.199.84.5:9090
basicAuth: false
isDefault: true
editable: true
2 changes: 1 addition & 1 deletion api/monitoring/prometheus/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ COPY ./configuration /etc/prometheus
EXPOSE 9090

# Run Prometheus in the foreground
CMD ["prometheus"]
CMD ["--config.file=/etc/prometheus/prometheus.yml"]
3 changes: 2 additions & 1 deletion api/monitoring/prometheus/configuration/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ scrape_configs:
- job_name: 'WiqMetrics'
metrics_path: '/actuator/prometheus'
scrape_interval: 10s
scheme: https
static_configs:
- targets: ['host.docker.internal:8443']
- targets: ['kiwiq.run.place:8443']
labels:
application: 'WIQ API'
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http, Authentication
.cors(Customizer.withDefaults())
.sessionManagement(configuration -> configuration.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
.authorizeHttpRequests(authorize -> authorize
.requestMatchers(HttpMethod.GET, "/actuator/**").permitAll()
.requestMatchers(HttpMethod.POST, "/actuator/**").permitAll()
.requestMatchers(HttpMethod.POST,"/questions/**").permitAll()
.requestMatchers(HttpMethod.GET,"/questions/**").permitAll()
.requestMatchers(HttpMethod.GET,"/users/details").authenticated()
Expand Down
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@
- "9090:9090"
networks:
mynetwork:
environment:
- API_URI=${API_URI}

volumes:
- prometheus_data:/prometheus
- /certs:/etc/letsencrypt/kiwiq.run.place:ro
Expand All @@ -114,7 +117,7 @@
- "9091:9091"
environment:
- GF_SERVER_HTTP_PORT=9091
- GF_AUTH_DISABLE_LOGIN_FORM=true
#- GF_AUTH_DISABLE_LOGIN_FORM=true
depends_on:
- prometheus
volumes:
Expand Down

0 comments on commit e37ad64

Please sign in to comment.