mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-04-24 03:00:09 -04:00
[WIP] Fix docker with lerna (#8)
* trying to fix Backend docker image with lerna * fix dockerfile CMD * Fix Dockerfile build * Fix 3box types Co-authored-by: Hammad Jutt <jutt@ualberta.ca>
This commit is contained in:
@@ -29,8 +29,8 @@
|
||||
"web3modal": "^1.3.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "yarn start",
|
||||
"start:app": "react-scripts start",
|
||||
"start": "yarn start:app:dev",
|
||||
"start:app:dev": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject",
|
||||
@@ -50,8 +50,5 @@
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/uuid": "^7.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "react",
|
||||
"typeRoots": ["./@types"]
|
||||
"typeRoots": [
|
||||
"../@types", "../../node_modules/@types"]
|
||||
},
|
||||
"include": [
|
||||
"src",
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
node_modules
|
||||
npm-debug.log
|
||||
@@ -1,13 +0,0 @@
|
||||
FROM node:12
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY package*.json ./
|
||||
|
||||
RUN yarn install
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN yarn build
|
||||
|
||||
CMD [ "yarn", "start" ]
|
||||
@@ -4,8 +4,9 @@
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"start": "node ./dist/index.js",
|
||||
"start:backend": "yarn dev",
|
||||
"start": "yarn start:backend",
|
||||
"start:backend": "node ./dist/index.js",
|
||||
"start:backend:dev": "yarn dev",
|
||||
"dev": "ts-node-dev --respawn --transpileOnly src/index.ts",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"build": "tsc"
|
||||
@@ -13,6 +14,7 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@the-game/utils": "1.0.0",
|
||||
"3box": "^1.18.1",
|
||||
"body-parser": "^1.19.0",
|
||||
"ethers": "^4.0.46",
|
||||
|
||||
@@ -8,7 +8,7 @@ import authHandler from './auth-webhook/handler';
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
router.get('/', function (req, res) {
|
||||
router.get('/', function (_, res) {
|
||||
res.send('pong')
|
||||
});
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ export function asyncHandlerWrapper(middleware: any) {
|
||||
};
|
||||
}
|
||||
|
||||
export function errorMiddleware(error: Error, req: Request, res: Response, next: NextFunction) {
|
||||
export function errorMiddleware(error: Error, _: Request, res: Response) {
|
||||
console.error(error);
|
||||
res.status(500).send('Unexpected error');
|
||||
}
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"target": "ES5",
|
||||
"module": "commonjs",
|
||||
"declaration": true,
|
||||
"sourceMap": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "./dist",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"typeRoots": ["./@types"]
|
||||
"typeRoots": [
|
||||
"../@types", "../../node_modules/@types"]
|
||||
},
|
||||
"include": [
|
||||
"src",
|
||||
"./@types"
|
||||
]
|
||||
"include": ["./src"]
|
||||
}
|
||||
|
||||
@@ -6,8 +6,9 @@
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start:app": "tsc -w",
|
||||
"start:backend": "tsc -w",
|
||||
"start:app:dev": "tsc -w",
|
||||
"start:backend:dev": "tsc -w",
|
||||
"prepare": "yarn build",
|
||||
"build": "tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -15,5 +16,8 @@
|
||||
"js-base64": "^2.5.2",
|
||||
"typescript": "^3.8.3",
|
||||
"uuid": "^8.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/uuid": "^8.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { ethers } from "ethers";
|
||||
import { Web3Provider } from "ethers/providers";
|
||||
import { Base64 } from 'js-base64';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
const tokenDuration = 1000 * 60 * 60 * 24 * 7; // 7 days
|
||||
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "./dist",
|
||||
"module": "CommonJS",
|
||||
"target": "ES5",
|
||||
"typeRoots": ["./@types"]
|
||||
"typeRoots": [
|
||||
"../@types", "../../node_modules/@types"]
|
||||
},
|
||||
"include": [
|
||||
"./src",
|
||||
"./@types"
|
||||
"./src"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user