-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
58 lines (58 loc) · 2.7 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
55
56
57
58
{
"name": "lighthouse-benchmark",
"version": "1.0.46",
"description": "A simple nodejs micro-service that runs Lighthouse benchmarks. There are two versions: http server and lambda server.",
"main": "index.js",
"config": {
"function": "lighthouse-benchmark",
"testUrl": "https://google.com",
"awsEcrUrl": "1234.dkr.ecr.us-east-1.amazonaws.com",
"awsEcrImg": "lighthouse-benchmark-lambda"
},
"scripts": {
"bump": "npm --no-git-tag-version version patch",
"build": "rm -rf dist &> /dev/null; tsc",
"bundle": "cp Dockerfile.server-alpine Dockerfile; zip -r bundle.zip package.json package-lock.json server.js src tsconfig.json Dockerfile .ebextensions; rm Dockerfile",
"start": "node server.js",
"test": "curl -o report.json \"localhost:8080?url=$npm_package_config_testUrl\"",
"docker:build": "docker build -t lighthouse-benchmark-server -f Dockerfile.server-alpine .",
"docker:dev": "docker run -p 8080:8080 lighthouse-benchmark-server",
"docker:test": "npm run test",
"lambda:build": "docker build -t lighthouse-benchmark-lambda -f Dockerfile.lambda-alpine .",
"lambda:dev": "docker run -v ~/.aws-lambda-rie:/aws-lambda -p 8080:8080 lighthouse-benchmark-lambda",
"lambda:test": "curl -o report.json -XPOST \"http://localhost:8080/2015-03-31/functions/function/invocations\" -d \"{\\\"httpMethod\\\": \\\"GET\\\", \\\"queryStringParameters\\\": {\\\"url\\\": \\\"$npm_package_config_testUrl\\\"}}\"",
"lambda:prod:test": "./aws/trigger-lambda $testUrl",
"lambda:deploy": "npm run lambda:deploy:login && npm run lambda:deploy:tag && npm run lambda:deploy:push && npm run lambda:deploy:apply",
"lambda:deploy:login": "aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $npm_package_config_awsEcrUrl",
"lambda:deploy:tag": "docker tag $npm_package_config_awsEcrImg:latest $npm_package_config_awsEcrUrl/$npm_package_config_awsEcrImg:latest",
"lambda:deploy:push": "docker push $npm_package_config_awsEcrUrl/$npm_package_config_awsEcrImg:latest",
"lambda:deploy:apply": "echo Goto your Lambda overview webpage and click 'Deploy new Image'"
},
"repository": {
"type": "git",
"url": "git+https://github.com/bdombro/lighthouse-docker.git"
},
"keywords": [
"lambda",
"lighthouse",
"aws",
"nodejs",
"headless",
"chrome",
"docker",
"container"
],
"author": "Brian Dombrowski",
"license": "ISC",
"bugs": {
"url": "https://github.com/bdombro/lighthouse-docker/issues"
},
"homepage": "https://github.com/bdombro/lighthouse-docker#readme",
"dependencies": {
"lighthouse": "7.0.1"
},
"devDependencies": {
"@types/node": "^14.14.31",
"typescript": "4.2.2"
}
}