updates
- TODO: Fix bug in navbar and directing
This commit is contained in:
@@ -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 */
|
/* Math Courses Start */
|
||||||
Math3200: {
|
Math3200: {
|
||||||
|
display: 'hidden',
|
||||||
type: 'page',
|
type: 'page',
|
||||||
theme:{
|
theme:{
|
||||||
|
sidebar: false,
|
||||||
timestamp: true,
|
timestamp: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Math429:{
|
Math429:{
|
||||||
|
display: 'hidden',
|
||||||
type: 'page',
|
type: 'page',
|
||||||
theme:{
|
theme:{
|
||||||
|
sidebar: false,
|
||||||
timestamp: true,
|
timestamp: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Math4111: {
|
Math4111: {
|
||||||
|
display: 'hidden',
|
||||||
type: 'page',
|
type: 'page',
|
||||||
theme:{
|
theme:{
|
||||||
|
sidebar: false,
|
||||||
timestamp: true,
|
timestamp: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Math4121: {
|
Math4121: {
|
||||||
|
display: 'hidden',
|
||||||
type: 'page',
|
type: 'page',
|
||||||
theme:{
|
theme:{
|
||||||
|
sidebar: false,
|
||||||
timestamp: true,
|
timestamp: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Math4201: {
|
Math4201: {
|
||||||
|
display: 'hidden',
|
||||||
type: 'page',
|
type: 'page',
|
||||||
theme:{
|
theme:{
|
||||||
|
sidebar: false,
|
||||||
timestamp: true,
|
timestamp: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Math416: {
|
Math416: {
|
||||||
|
display: 'hidden',
|
||||||
type: 'page',
|
type: 'page',
|
||||||
theme:{
|
theme:{
|
||||||
|
sidebar: false,
|
||||||
timestamp: true,
|
timestamp: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Math401: {
|
Math401: {
|
||||||
|
display: 'hidden',
|
||||||
type: 'page',
|
type: 'page',
|
||||||
theme:{
|
theme:{
|
||||||
|
sidebar: false,
|
||||||
timestamp: true,
|
timestamp: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* Math Courses End */
|
/* Math Courses End */
|
||||||
/* CSE Courses Start */
|
/* CSE Courses Start */
|
||||||
CSE332S: {
|
CSE332S: {
|
||||||
|
display: 'hidden',
|
||||||
title: 'CSE332S',
|
title: 'CSE332S',
|
||||||
type: 'page',
|
type: 'page',
|
||||||
theme:{
|
theme:{
|
||||||
|
sidebar: false,
|
||||||
timestamp: true,
|
timestamp: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
CSE347: {
|
CSE347: {
|
||||||
|
display: 'hidden',
|
||||||
title: 'CSE347',
|
title: 'CSE347',
|
||||||
type: 'page',
|
type: 'page',
|
||||||
theme:{
|
theme:{
|
||||||
|
sidebar: false,
|
||||||
timestamp: true,
|
timestamp: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
CSE442T: {
|
CSE442T: {
|
||||||
|
display: 'hidden',
|
||||||
title: 'CSE442T',
|
title: 'CSE442T',
|
||||||
type: 'page',
|
type: 'page',
|
||||||
theme:{
|
theme:{
|
||||||
|
sidebar: false,
|
||||||
timestamp: true,
|
timestamp: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
CSE5313: {
|
CSE5313: {
|
||||||
|
display: 'hidden',
|
||||||
title: 'CSE5313',
|
title: 'CSE5313',
|
||||||
type: 'page',
|
type: 'page',
|
||||||
theme:{
|
theme:{
|
||||||
|
sidebar: false,
|
||||||
timestamp: true,
|
timestamp: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
CSE510: {
|
CSE510: {
|
||||||
|
display: 'hidden',
|
||||||
title: 'CSE510',
|
title: 'CSE510',
|
||||||
type: 'page',
|
type: 'page',
|
||||||
theme:{
|
theme:{
|
||||||
|
sidebar: false,
|
||||||
timestamp: true,
|
timestamp: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
CSE559A: {
|
CSE559A: {
|
||||||
|
display: 'hidden',
|
||||||
title: 'CSE559A',
|
title: 'CSE559A',
|
||||||
type: 'page',
|
type: 'page',
|
||||||
theme:{
|
theme:{
|
||||||
|
sidebar: false,
|
||||||
timestamp: true,
|
timestamp: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
CSE5519: {
|
CSE5519: {
|
||||||
|
display: 'hidden',
|
||||||
title: 'CSE5519',
|
title: 'CSE5519',
|
||||||
type: 'page',
|
type: 'page',
|
||||||
theme:{
|
theme:{
|
||||||
|
sidebar: false,
|
||||||
timestamp: true,
|
timestamp: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -66,8 +66,8 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
|||||||
|
|
||||||
USER nextjs
|
USER nextjs
|
||||||
|
|
||||||
EXPOSE 4201
|
EXPOSE 4200
|
||||||
|
|
||||||
ENV PORT=4201
|
ENV PORT=4200
|
||||||
|
|
||||||
CMD HOSTNAME="0.0.0.0" node server.js
|
CMD HOSTNAME="0.0.0.0" node server.js
|
||||||
1
docker/docker-compose-rebuild.sh
Normal file
1
docker/docker-compose-rebuild.sh
Normal file
@@ -0,0 +1 @@
|
|||||||
|
docker compose -f docker/docker-compose.yaml up -d --build notenextra-math notenextra-cse
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
name: notenextra
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# you may need to update relative directories if you move this file
|
# you may need to update relative directories if you move this file
|
||||||
# default created directories is /docker/docker-compose.yaml
|
# default created directories is /docker/docker-compose.yaml
|
||||||
@@ -9,7 +11,7 @@ services:
|
|||||||
- trance0/notenextra-math:latest
|
- trance0/notenextra-math:latest
|
||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
ports:
|
ports:
|
||||||
- 13001:4201
|
- 13001:4200
|
||||||
notenextra-cse:
|
notenextra-cse:
|
||||||
build:
|
build:
|
||||||
context: ../
|
context: ../
|
||||||
@@ -18,11 +20,11 @@ services:
|
|||||||
- trance0/notenextra-cse:latest
|
- trance0/notenextra-cse:latest
|
||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
ports:
|
ports:
|
||||||
- 13002:4202
|
- 13002:4200
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx:latest
|
image: nginx:latest
|
||||||
ports:
|
ports:
|
||||||
- 13000:80
|
- 13003:80
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx.conf:/etc/nginx/nginx.conf
|
- ./nginx.conf:/etc/nginx/nginx.conf
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@@ -66,8 +66,8 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
|||||||
|
|
||||||
USER nextjs
|
USER nextjs
|
||||||
|
|
||||||
EXPOSE 4201
|
EXPOSE 4200
|
||||||
|
|
||||||
ENV PORT=4201
|
ENV PORT=4200
|
||||||
|
|
||||||
CMD HOSTNAME="0.0.0.0" node server.js
|
CMD HOSTNAME="0.0.0.0" node server.js
|
||||||
@@ -1,23 +1,84 @@
|
|||||||
# Example for conf.d/default.conf
|
# 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 {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
location /Math* {
|
rewrite ^/.well-known/carddav /remote.php/dav/ permanent;
|
||||||
proxy_pass http://notenextra-math:4201;
|
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 Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /CSE* {
|
location ~ ^/CSE(.*)$ {
|
||||||
proxy_pass http://notenextra-cse:4202;
|
proxy_pass http://notenextra-cse/$1;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@@ -24,11 +24,11 @@ export default bundleAnalyzer(withNextra({
|
|||||||
eslint: {
|
eslint: {
|
||||||
ignoreDuringBuilds: true,
|
ignoreDuringBuilds: true,
|
||||||
},
|
},
|
||||||
experimental: {
|
// experimental: {
|
||||||
webpackMemoryOptimizations: true,
|
// webpackMemoryOptimizations: true,
|
||||||
staticGenerationMaxConcurrency: 2, // try 1–3, default is 8
|
// staticGenerationMaxConcurrency: 2, // try 1–3, default is 8
|
||||||
staticGenerationMinPagesPerWorker: 1 // keep small, default is 25
|
// staticGenerationMinPagesPerWorker: 1 // keep small, default is 25
|
||||||
}
|
// }
|
||||||
}))
|
}))
|
||||||
|
|
||||||
// If you have other Next.js configurations, you can pass them as the parameter:
|
// If you have other Next.js configurations, you can pass them as the parameter:
|
||||||
|
|||||||
Reference in New Issue
Block a user