-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
54 lines (54 loc) · 3.68 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
"name": "app-node-js",
"version": "1.0.0",
"description": "Production-ready node.js app boilerplate.",
"repository": {
"type": "git",
"url": "https://github.com/olivr/app-node-js.git"
},
"engines": {
"node": "16"
},
"dependencies": {
"@godaddy/terminus": "^4.9.0",
"@opentelemetry/api": "^1.0.3",
"@opentelemetry/exporter-jaeger": "^1.0.0",
"@opentelemetry/instrumentation-express": "^0.26.0",
"@opentelemetry/instrumentation-http": "^0.26.0",
"@opentelemetry/instrumentation-pino": "^0.26.0",
"@opentelemetry/resources": "^1.0.0",
"@opentelemetry/sdk-node": "^0.26.0",
"@opentelemetry/sdk-trace-base": "^1.0.0",
"@promster/express": "^7.0.0",
"express": "^4.17.1",
"pino-http": "^5.8.0 <6",
"prom-client": "^14.0.1"
},
"author": "Romain Barissat",
"license": "Apache-2.0",
"devDependencies": {
"nodemon": "^2.0.14",
"pino-pretty": "^7.2.0"
},
"scripts": {
"dev": "yarn docker:stop; OTEL_EXPORTER_JAEGER_ENDPOINT=http://localhost:14268/api/traces yarn nodemon --inspect src/index.js | yarn pino-pretty -c -t",
"docker:cleanup": "echo '=> Deleting existing container...'; (docker rm $(docker ps -a -q --filter ancestor=app-node-js)) &>/dev/null || echo '=> No container to delete.'",
"docker:debug": "yarn docker:stop; yarn docker:debug:build && yarn docker:debug:start && yarn docker:logs",
"docker:debug:build": "docker build --target debug --build-arg node_version=$npm_package_engines_node -t app-node-js .",
"docker:debug:start": "docker run --rm -d -p 3000:3000 -p 9229:9229 --env OTEL_EXPORTER_JAEGER_ENDPOINT=http://host.docker.internal:14268/api/traces --add-host host.docker.internal:host-gateway app-node-js",
"docker:dev": "yarn docker:stop; yarn docker:dev:build && yarn docker:dev:start && yarn docker:logs",
"docker:dev:build": "docker build --target dev --build-arg node_version=$npm_package_engines_node --build-arg node_env=development -t app-node-js .",
"docker:dev:start": "docker run --rm -d -p 3000:3000 -p 9229:9229 -v $PWD/src:/app/src:ro --env OTEL_EXPORTER_JAEGER_ENDPOINT=http://host.docker.internal:14268/api/traces --add-host host.docker.internal:host-gateway app-node-js",
"docker:logs": "docker logs $(docker ps -q --filter ancestor=app-node-js) -f | yarn pino-pretty -c -t",
"docker:prod": "yarn docker:stop; yarn docker:prod:build && yarn docker:prod:start && yarn docker:logs",
"docker:prod:build": "docker build --build-arg node_version=$npm_package_engines_node -t app-node-js .",
"docker:prod:start": "docker run --rm -d -p 3000:3000 --env OTEL_EXPORTER_JAEGER_ENDPOINT=http://host.docker.internal:14268/api/traces --add-host host.docker.internal:host-gateway app-node-js",
"docker:stop": "echo '=> Stopping existing container...'; (docker stop $(docker ps -a -q --filter ancestor=app-node-js)) &>/dev/null || echo '=> No container to stop.'",
"jaeger:destroy": "docker rm $(docker stop jaeger)",
"jaeger:init": "docker start jaeger || (echo '=> No Jaeger container detected, creating new one...' && docker run -d --name jaeger -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 -p 5775:5775/udp -p 6831:6831/udp -p 6832:6832/udp -p 5778:5778 -p 16686:16686 -p 14268:14268 -p 14250:14250 -p 9411:9411 jaegertracing/all-in-one:latest)",
"k8s:cleanup": "tilt down -- --app_name $npm_package_name",
"k8s:debug": "yarn docker:stop; tilt up -- --app_name $npm_package_name --node_version $npm_package_engines_node --stage debug",
"k8s:dev": "yarn docker:stop; tilt up -- --app_name $npm_package_name --node_version $npm_package_engines_node",
"k8s:prod": "yarn docker:stop; tilt up -- --app_name $npm_package_name --node_version $npm_package_engines_node --stage prod"
}
}