-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
1,962 additions
and
485 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
version: '3.8' | ||
|
||
services: | ||
was-b: | ||
build: . | ||
expose: | ||
- 4000 | ||
depends_on: | ||
- mysql | ||
- redis | ||
restart: unless-stopped | ||
networks: | ||
- common-network | ||
environment: | ||
- SPRING_CONFIG_LOCATION=file:///etc/additional.yml | ||
- OTEL_EXPORTER_OTLP_ENDPOINT=http://tempo:4317 | ||
- OTEL_SERVICE_NAME=was-b # service name for Span | ||
- OTEL_RESOURCE_ATTRIBUTES=compose_service=was-b # add custom resource attribute to Span for Grafana Trace to Logs feature | ||
- OTEL_METRICS_EXPORTER=none # disable metrics exporter | ||
- MANAGEMENT_METRICS_TAGS_APPLICATION=was-b # override default value of management.metrics.tags.application in app/src/main/resources/application.properties | ||
volumes: | ||
- ./src/main/resources/application-prod.yml:/etc/additional.yml | ||
|
||
nginx: | ||
image: nginx:latest | ||
restart: unless-stopped | ||
ports: | ||
- 8888:8888 | ||
volumes: | ||
- ./nginx.observe.conf:/etc/nginx/nginx.conf | ||
depends_on: | ||
- was-b | ||
- was-waiting | ||
networks: | ||
- common-network | ||
|
||
mysql: | ||
image: mysql:8.0.33 | ||
expose: | ||
- 3306 | ||
volumes: | ||
- ./db/mysql/data:/var/lib/mysql | ||
- ./db/mysql/init:/docker-entrypoint-initdb.d | ||
command: | ||
- '--character-set-server=utf8mb4' | ||
- '--collation-server=utf8mb4_unicode_ci' | ||
environment: | ||
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD} | ||
MYSQL_DATABASE: ${DB_DATABASE} | ||
restart: unless-stopped | ||
networks: | ||
- common-network | ||
|
||
redis: | ||
image: redis:6.2-alpine | ||
expose: | ||
- 6379 | ||
environment: | ||
REDIS_PASSWORD: '${REDIS_PASSWORD}' | ||
command: redis-server /usr/local/etc/redis/redis.conf --save 20 1 --loglevel warning --requirepass $REDIS_PASSWORD | ||
volumes: | ||
- ./db/redis/data:/data | ||
- ./redis.conf:/usr/local/etc/redis/redis.conf | ||
restart: unless-stopped | ||
networks: | ||
- common-network | ||
|
||
was-waiting: | ||
image: tiketeer-waiting | ||
expose: | ||
- 8080 | ||
depends_on: | ||
- mysql | ||
- redis | ||
restart: unless-stopped | ||
environment: | ||
- OTEL_EXPORTER_OTLP_ENDPOINT=http://tempo:4317 # send traces to Tempo | ||
- OTEL_SERVICE_NAME=was-waiting # service name for Span | ||
- OTEL_RESOURCE_ATTRIBUTES=compose_service=was-waiting # add custom resource attribute to Span for Grafana Trace to Logs feature | ||
- OTEL_METRICS_EXPORTER=none # disable metrics exporter | ||
- MANAGEMENT_METRICS_TAGS_APPLICATION=was-waiting # override default value of management.metrics.tags.application in app/src/main/resources/application.properties | ||
networks: | ||
- common-network | ||
|
||
loki: | ||
image: grafana/loki:3.0.0 | ||
command: -config.file=/etc/loki/local-config.yaml | ||
ports: | ||
- "3100:3100" | ||
networks: | ||
- common-network | ||
|
||
prometheus: | ||
image: prom/prometheus:v2.51.2 | ||
ports: | ||
- "9090:9090" | ||
volumes: | ||
- ./etc/prometheus:/workspace | ||
command: | ||
- --config.file=/workspace/prometheus.yml | ||
- --enable-feature=exemplar-storage | ||
depends_on: | ||
- loki | ||
networks: | ||
- common-network | ||
|
||
tempo: | ||
image: grafana/tempo:2.4.1 | ||
command: [ "--target=all", "--storage.trace.backend=local", "--storage.trace.local.path=/var/tempo", "--auth.enabled=false" ] | ||
ports: | ||
- "14250:14250" | ||
- "4317:4317" | ||
depends_on: | ||
- loki | ||
networks: | ||
- common-network | ||
|
||
grafana: | ||
image: grafana/grafana:10.4.2 | ||
ports: | ||
- "5000:3000" | ||
volumes: | ||
- ./etc/grafana/:/etc/grafana/provisioning/datasources | ||
- ./etc/dashboards.yaml:/etc/grafana/provisioning/dashboards/dashboards.yaml | ||
- ./etc/dashboards:/etc/grafana/dashboards | ||
depends_on: | ||
- loki | ||
- prometheus | ||
networks: | ||
- common-network | ||
|
||
networks: | ||
common-network: | ||
driver: bridge | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: 1 | ||
providers: | ||
- name: 'Spring Boot Observability Test' | ||
orgId: 1 | ||
folder: '' | ||
type: 'file' | ||
disableDeletion: true | ||
editable: true | ||
options: | ||
path: '/etc/grafana/dashboards' |
Oops, something went wrong.