Skip to content
Closed

Dev #27

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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ yarn-debug.log*
yarn-error.log*
lerna-debug.log*
html

# Development tools
.idea

Expand Down Expand Up @@ -112,4 +111,6 @@ dist
jest_html_reporters.html
reports

config/default.json

config/local*.json
34 changes: 0 additions & 34 deletions .vscode/launch.json

This file was deleted.

31 changes: 19 additions & 12 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"telemetry": {
"metrics": {},
"tracing": {
"isEnabled": false
"isEnabled": true,
"url": "http://localhost:4318/v1/traces"
},
"shared": {},
"logger": {
Expand All @@ -20,17 +21,23 @@
}
},
"server": {
"port": 8080,
"request": {
"payload": {
"limit": "1mb"
}
},
"response": {
"compression": {
"enabled": true,
"options": null
}
"port": 8080
},
"db": {
"type": "postgres",
"host": "localhost",
"port": 5432,
"username": "myuser",
"password": "mypassword",
"database": "mydatabase",
"schema": "public",
"synchronize": true,
"logging": false
},
"response": {
"compression": {
"enabled": true,
"options": null
}
}
}
34 changes: 34 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
services:
postgres:
image: postgis/postgis:17-3.5-alpine
platform: linux/amd64
container_name: my-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- '5432:5432'
volumes:
- postgres_data:/var/lib/postgresql/data

otel-lgtm:
image: grafana/otel-lgtm:latest
container_name: lgtm-stack
extra_hosts:
- 'host.docker.internal:host-gateway'
ports:
- '3000:3000'
- '4317:4317'
- '4318:4318'
- '9090:9090'
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
volumes:
- lgtm-data:/data
- ./observability/prometheus.yml:/otel-lgtm/prometheus.yaml

volumes:
postgres_data:
lgtm-data:
15 changes: 15 additions & 0 deletions launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug Vitest",
"autoAttachChildProcesses": true,
"program": "${workspaceRoot}/node_modules/vitest/vitest.mjs",
"args": ["run"],
"smartStep": true,
"console": "integratedTerminal"
}
]
}
7 changes: 7 additions & 0 deletions observability/prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
global:
scrape_interval: 15s

scrape_configs:
- job_name: 'my-app'
static_configs:
- targets: ['host.docker.internal:8080']
Loading
Loading