mirror of
https://github.com/apotdevin/thunderhub.git
synced 2024-11-19 01:40:03 +01:00
chore: docker changes
This commit is contained in:
parent
bcea9bb62f
commit
c88d3ede36
@ -5,6 +5,7 @@
|
||||
!README*.md
|
||||
/node_modules
|
||||
/.next
|
||||
src/client/.next
|
||||
/dist
|
||||
/docs
|
||||
/.github
|
||||
|
@ -1,5 +1,6 @@
|
||||
node_modules
|
||||
.next
|
||||
src/client/.next
|
||||
|
||||
**/*.generated.tsx
|
||||
src/graphql/types.ts
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,6 +2,7 @@
|
||||
/dist
|
||||
/node_modules
|
||||
/.next
|
||||
src/client/.next
|
||||
|
||||
# Logs
|
||||
logs
|
||||
|
@ -58,7 +58,7 @@ COPY --from=build /app/node_modules/ ./node_modules
|
||||
# Copy NextJS files
|
||||
COPY --from=build /app/src/client/public ./src/client/public
|
||||
COPY --from=build /app/src/client/next.config.js ./src/client/
|
||||
COPY --from=build /app/.next/ ./.next
|
||||
COPY --from=build /app/src/client/.next/ ./src/client/.next
|
||||
|
||||
# Copy NestJS files
|
||||
COPY --from=build /app/dist/ ./dist
|
||||
|
@ -58,7 +58,7 @@ COPY --from=build /app/node_modules/ ./node_modules
|
||||
# Copy NextJS files
|
||||
COPY --from=build /app/src/client/public ./src/client/public
|
||||
COPY --from=build /app/src/client/next.config.js ./src/client/
|
||||
COPY --from=build /app/.next/ ./.next
|
||||
COPY --from=build /app/src/client/.next/ ./src/client/.next
|
||||
|
||||
# Copy NestJS files
|
||||
COPY --from=build /app/dist/ ./dist
|
||||
|
@ -58,7 +58,7 @@ COPY --from=build /app/node_modules/ ./node_modules
|
||||
# Copy NextJS files
|
||||
COPY --from=build /app/src/client/public ./src/client/public
|
||||
COPY --from=build /app/src/client/next.config.js ./src/client/
|
||||
COPY --from=build /app/.next/ ./.next
|
||||
COPY --from=build /app/src/client/.next/ ./src/client/.next
|
||||
|
||||
# Copy NestJS files
|
||||
COPY --from=build /app/dist/ ./dist
|
||||
|
@ -8,9 +8,9 @@
|
||||
"build": "npm run build:nest && npm run build:next",
|
||||
"build:nest": "nest build",
|
||||
"build:next": "cd src/client && next build",
|
||||
"build:image": "docker build --no-cache -t apotdevin/thunderhub:test-amd64 .",
|
||||
"build:image:base": "docker build --build-arg BASE_PATH=/thub --no-cache -t apotdevin/thunderhub:test-amd64 .",
|
||||
"build:32": "docker build --no-cache -f arm32v7.Dockerfile -t apotdevin/thunderhub:test-arm32v7 .",
|
||||
"build:image": "docker build -t apotdevin/thunderhub:test-amd64 .",
|
||||
"build:image:base": "docker build --build-arg BASE_PATH=/thub -t apotdevin/thunderhub:test-amd64 .",
|
||||
"build:32": "docker build -f arm32v7.Dockerfile -t apotdevin/thunderhub:test-arm32v7 .",
|
||||
"build:64": "docker build -f arm64v8.Dockerfile -t apotdevin/thunderhub:test-arm64v8 .",
|
||||
"build:manifest": "docker manifest create apotdevin/thunderhub:test apotdevin/thunderhub:test-amd64 apotdevin/thunderhub:test-arm32v7 apotdevin/thunderhub:test-arm64v8",
|
||||
"build:all": "sh ./scripts/buildAllImages.sh",
|
||||
|
@ -8,7 +8,6 @@ dotenv.config({ path: path.resolve(process.cwd(), '.env') });
|
||||
|
||||
module.exports = {
|
||||
reactStrictMode: true,
|
||||
distDir: '../../.next',
|
||||
poweredByHeader: false,
|
||||
basePath: process.env.BASE_PATH || '',
|
||||
publicRuntimeConfig: {
|
||||
|
@ -42,7 +42,6 @@ export type JwtObjectType = {
|
||||
SubModule,
|
||||
WsModule,
|
||||
ApiModule,
|
||||
ViewModule,
|
||||
NodeModule,
|
||||
AuthenticationModule,
|
||||
FilesModule,
|
||||
@ -108,6 +107,8 @@ export type JwtObjectType = {
|
||||
: combine(timestamp(), prettyPrint()),
|
||||
}),
|
||||
}),
|
||||
// ViewModule has to be the last because of the wildcard controller
|
||||
ViewModule,
|
||||
],
|
||||
})
|
||||
export class AppModule {}
|
||||
|
@ -4,41 +4,13 @@ import { Request, Response } from 'express';
|
||||
import { Public } from '../security/security.decorators';
|
||||
import { ViewService } from './view.service';
|
||||
|
||||
const NEXT_ROUTES = [
|
||||
// Assets
|
||||
'static*',
|
||||
'assets*',
|
||||
'_next*',
|
||||
'favicon.ico',
|
||||
// Routes
|
||||
'',
|
||||
'scores*',
|
||||
'settings*',
|
||||
'chain',
|
||||
'channels*',
|
||||
'chat',
|
||||
'dashboard',
|
||||
'forwards',
|
||||
'leaderboard',
|
||||
'lnmarkets',
|
||||
'login',
|
||||
'peers',
|
||||
'rebalance',
|
||||
'sso',
|
||||
'stats',
|
||||
'swap',
|
||||
'token',
|
||||
'tools',
|
||||
'transactions',
|
||||
];
|
||||
|
||||
@Public()
|
||||
@SkipThrottle()
|
||||
@Controller('/')
|
||||
export class ViewController {
|
||||
constructor(private viewService: ViewService) {}
|
||||
|
||||
@Get(NEXT_ROUTES)
|
||||
@Get('*')
|
||||
public async showHome(@Req() req: Request, @Res() res: Response) {
|
||||
await this.viewService.handler(req, res);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user