fix: make the CDN build correctly

This commit is contained in:
Hayden Young
2021-10-17 11:55:54 +00:00
committed by GitHub
parent 685cfaf06a
commit 79aae987fd
8 changed files with 354 additions and 22137 deletions
+14 -7
View File
@@ -1,7 +1,14 @@
FROM node:lts-alpine
WORKDIR /usr/src/fosscord-cdn
COPY package.json .
RUN npm install
COPY . .
EXPOSE 3003
CMD ["node", "dist/"]
FROM node:lts-alpine AS builder
WORKDIR /usr/src/util
COPY util .
RUN npm install && npm run build
WORKDIR /usr/src/cdn
COPY cdn/ .
RUN npm install && npm run build
EXPOSE 3001
CMD ["node", "dist/start.js"]
+210 -14612
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -5,10 +5,9 @@
"main": "dist/index.js",
"types": "src/index.ts",
"scripts": {
"postinstall": "ts-patch install -s",
"test": "npm run build && jest --coverage ./tests",
"build": "npx tsc -p .",
"start": "npm run build && node dist/start.js"
"start": "node dist/start.js"
},
"repository": {
"type": "git",
@@ -46,11 +45,12 @@
"express": "^4.17.1",
"express-async-errors": "^3.1.1",
"file-type": "^16.5.0",
"form-data": "^4.0.0",
"fs-extra": "^10.0.0",
"image-size": "^1.0.0",
"jest": "^27.0.6",
"lambert-db": "^1.2.3",
"lambert-server": "^1.2.11",
"lambert-server": "^1.2.12",
"missing-native-js-functions": "^1.2.17",
"multer": "^1.4.2",
"nanocolors": "^0.2.12",
+4 -4
View File
@@ -5,9 +5,9 @@
/* Basic Options */
"incremental": true /* Enable incremental compilation */,
"target": "ES6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
"target": "ES2020" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
"lib": ["ES2015", "dom"] /* Specify library files to be included in the compilation. */,
"lib": ["ES2020", "dom"] /* Specify library files to be included in the compilation. */,
"allowJs": true /* Allow javascript files to be compiled. */,
"checkJs": true /* Report errors in .js files. */,
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
@@ -60,8 +60,8 @@
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
/* Experimental Options */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
"experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
"emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
/* Advanced Options */
"skipLibCheck": true /* Skip type checking of declaration files. */,