updates
- TODO: Fix bug in navbar and directing
This commit is contained in:
@@ -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
|
||||
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:
|
||||
# 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:
|
||||
|
||||
@@ -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
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user