Merge pull request #7 from Trance-0/main

updates
This commit is contained in:
Dream Tokenizer
2025-10-24 21:55:07 -05:00
committed by GitHub
7 changed files with 166 additions and 17 deletions

View File

@@ -24,97 +24,182 @@ export default {
}
},
},
/* Load link with relative path */
Math3200_link: {
title: 'Math 3200',
href: '/Math3200'
},
Math429_link: {
title: 'Math 429',
href: '/Math429'
},
Math4111_link: {
title: 'Math 4111',
href: '/Math4111'
},
Math4121_link: {
title: 'Math 4121',
href: '/Math4121'
},
Math4201_link: {
title: 'Math 4201',
href: '/Math4201'
},
Math416_link: {
title: 'Math 416',
href: '/Math416'
},
Math401_link: {
title: 'Math 401',
href: '/Math401'
},
CSE332S_link: {
title: 'CSE 332S',
href: '/CSE332S'
},
CSE347_link: {
title: 'CSE 347',
href: '/CSE347'
},
CSE442T_link: {
title: 'CSE 442T',
href: '/CSE442T'
},
CSE5313_link: {
title: 'CSE 5313',
href: '/CSE5313'
},
CSE510_link: {
title: 'CSE 510',
href: '/CSE510'
},
CSE559A_link: {
title: 'CSE 559A',
href: '/CSE559A'
},
CSE5519_link: {
title: 'CSE 5519',
href: '/CSE5519'
},
/* Math Courses Start */
Math3200: {
display: 'hidden',
type: 'page',
theme:{
sidebar: false,
timestamp: true,
}
},
Math429:{
display: 'hidden',
type: 'page',
theme:{
sidebar: false,
timestamp: true,
}
},
Math4111: {
display: 'hidden',
type: 'page',
theme:{
sidebar: false,
timestamp: true,
}
},
Math4121: {
display: 'hidden',
type: 'page',
theme:{
sidebar: false,
timestamp: true,
}
},
Math4201: {
display: 'hidden',
type: 'page',
theme:{
sidebar: false,
timestamp: true,
}
},
Math416: {
display: 'hidden',
type: 'page',
theme:{
sidebar: false,
timestamp: true,
}
},
Math401: {
display: 'hidden',
type: 'page',
theme:{
sidebar: false,
timestamp: true,
}
},
/* Math Courses End */
/* CSE Courses Start */
CSE332S: {
display: 'hidden',
title: 'CSE332S',
type: 'page',
theme:{
sidebar: false,
timestamp: true,
}
},
CSE347: {
display: 'hidden',
title: 'CSE347',
type: 'page',
theme:{
sidebar: false,
timestamp: true,
}
},
CSE442T: {
display: 'hidden',
title: 'CSE442T',
type: 'page',
theme:{
sidebar: false,
timestamp: true,
}
},
CSE5313: {
display: 'hidden',
title: 'CSE5313',
type: 'page',
theme:{
sidebar: false,
timestamp: true,
}
},
CSE510: {
display: 'hidden',
title: 'CSE510',
type: 'page',
theme:{
sidebar: false,
timestamp: true,
}
},
CSE559A: {
display: 'hidden',
title: 'CSE559A',
type: 'page',
theme:{
sidebar: false,
timestamp: true,
}
},
CSE5519: {
display: 'hidden',
title: 'CSE5519',
type: 'page',
theme:{
sidebar: false,
timestamp: true,
}
},

View File

@@ -66,8 +66,8 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
USER nextjs
EXPOSE 4201
EXPOSE 4200
ENV PORT=4201
ENV PORT=4200
CMD HOSTNAME="0.0.0.0" node server.js

View File

@@ -0,0 +1 @@
docker compose -f docker/docker-compose.yaml up -d --build notenextra-math notenextra-cse

View File

@@ -1,3 +1,5 @@
name: notenextra
services:
# you may need to update relative directories if you move this file
# default created directories is /docker/docker-compose.yaml
@@ -9,7 +11,7 @@ services:
- trance0/notenextra-math:latest
restart: on-failure:5
ports:
- 13001:4201
- 13001:4200
notenextra-cse:
build:
context: ../
@@ -18,11 +20,11 @@ services:
- trance0/notenextra-cse:latest
restart: on-failure:5
ports:
- 13002:4202
- 13002:4200
nginx:
image: nginx:latest
ports:
- 13000:80
- 13003:80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on:

View File

@@ -66,8 +66,8 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
USER nextjs
EXPOSE 4201
EXPOSE 4200
ENV PORT=4201
ENV PORT=4200
CMD HOSTNAME="0.0.0.0" node server.js

View File

@@ -1,23 +1,84 @@
# Example for conf.d/default.conf
user www-data;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
upstream notenextra-math {
server notenextra-math:4200;
}
upstream notenextra-cse {
server notenextra-cse:4200;
}
include /etc/nginx/mime.types;
# add extra types
types {
text/javascript mjs;
}
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
server {
listen 80;
server_name localhost;
location /Math* {
proxy_pass http://notenextra-math:4201;
rewrite ^/.well-known/carddav /remote.php/dav/ permanent;
rewrite ^/.well-known/caldav /remote.php/dav/ permanent;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ ^/(build|tests|config|lib|3rdparty|templates|data)/ {
deny all;
}
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all;
}
location ~ ^/Math(.*)$ {
proxy_pass http://notenextra-math/$1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /CSE* {
proxy_pass http://notenextra-cse:4202;
location ~ ^/CSE(.*)$ {
proxy_pass http://notenextra-cse/$1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location / {
proxy_pass http://notenextra-cse;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
}

View File

@@ -24,11 +24,11 @@ export default bundleAnalyzer(withNextra({
eslint: {
ignoreDuringBuilds: true,
},
experimental: {
webpackMemoryOptimizations: true,
staticGenerationMaxConcurrency: 2, // try 13, default is 8
staticGenerationMinPagesPerWorker: 1 // keep small, default is 25
}
// experimental: {
// webpackMemoryOptimizations: true,
// staticGenerationMaxConcurrency: 2, // try 13, default is 8
// staticGenerationMinPagesPerWorker: 1 // keep small, default is 25
// }
}))
// If you have other Next.js configurations, you can pass them as the parameter: