Skip to content

Commit

Permalink
Merge pull request #69 from Synthetixio/dev
Browse files Browse the repository at this point in the history
update nginx
  • Loading branch information
drptbl authored May 5, 2023
2 parents 403351e + 0323e98 commit 135c7ec
Show file tree
Hide file tree
Showing 5 changed files with 540 additions and 854 deletions.
2 changes: 1 addition & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ services:

proxy:
container_name: proxy
image: synthetixio/nginx-debug:604f26c1990320d4a24c08074f2ee82d1db9bec4-base
image: synthetixio/nginx-debug:41158a4bf17aca53222e6b101633ddfa5af7724c-base
restart: unless-stopped
volumes:
- ./nginx/templates:/etc/nginx/templates
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ services:

proxy:
container_name: proxy
image: synthetixio/nginx:604f26c1990320d4a24c08074f2ee82d1db9bec4-base
image: synthetixio/nginx:41158a4bf17aca53222e6b101633ddfa5af7724c-base
restart: unless-stopped
volumes:
- ./nginx/templates:/etc/nginx/templates
Expand Down
19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"update:deps": "ncu -u && yarn"
},
"dependencies": {
"@aws-sdk/client-cloudwatch-logs": "3.306.0",
"@synthetixio/contracts-interface": "2.77.0",
"@aws-sdk/client-cloudwatch-logs": "3.327.0",
"@synthetixio/contracts-interface": "2.77.2",
"basic-auth": "2.0.1",
"bignumber.js": "9.1.1",
"cookie-parser": "1.4.6",
Expand All @@ -23,20 +23,19 @@
"express": "4.18.2",
"express-basic-auth": "1.2.1",
"morgan": "1.10.0",
"redis": "4.6.5",
"redis": "4.6.6",
"serve-favicon": "2.5.0",
"swagger-jsdoc": "6.2.8",
"swagger-ui-express": "4.6.2",
"winston": "3.8.2",
"winston-cloudwatch": "6.1.1"
"swagger-ui-express": "4.6.3",
"winston": "3.8.2"
},
"devDependencies": {
"@trunkio/launcher": "1.2.3",
"eslint": "8.37.0",
"@trunkio/launcher": "1.2.4",
"eslint": "8.39.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-prettier": "4.2.1",
"nodemon": "2.0.22",
"npm-check-updates": "16.10.7",
"prettier": "2.8.7"
"npm-check-updates": "16.10.9",
"prettier": "2.8.8"
}
}
33 changes: 0 additions & 33 deletions src/utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
const redis = require('redis');
const winston = require('winston');
const winstonCloudwatch = require('winston-cloudwatch');
const crypto = require('crypto');
const BigNumber = require('bignumber.js');
const { ethers } = require('ethers');
const { synthetix } = require('@synthetixio/contracts-interface');
Expand Down Expand Up @@ -32,37 +30,6 @@ const transports = [
),
}),
];
if (
process.env.AWS_CW_REGION &&
process.env.AWS_CW_LOG_GROUP &&
process.env.AWS_CW_ACCESS_KEY_ID &&
process.env.AWS_CW_SECRET_ACCESS_KEY
) {
const startTime = new Date().toISOString();
transports.push(
new winstonCloudwatch({
logGroupName: process.env.AWS_CW_LOG_GROUP,
logStreamName: () => {
let date = new Date().toISOString().split('T')[0];
return `snx-api-server-${date}-${crypto
.createHash('md5')
.update(startTime)
.digest('hex')}`;
},
messageFormatter: (log) => {
if (process.env.NODE_APP_INSTANCE) {
return `[cluster: ${process.env.NODE_APP_INSTANCE}] ${log.level}: ${log.message}`;
} else {
return `${log.level}: ${log.message}`;
}
},
awsAccessKeyId: process.env.AWS_CW_ACCESS_KEY_ID,
awsSecretKey: process.env.AWS_CW_SECRET_ACCESS_KEY,
awsRegion: process.env.AWS_CW_REGION,
jsonMessage: true,
}),
);
}

const log = winston.createLogger({
level: process.env.DEBUG ? 'debug' : 'error',
Expand Down
Loading

0 comments on commit 135c7ec

Please sign in to comment.