-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(backend): add monitor and admin in docker compose
- Loading branch information
1 parent
2544e3f
commit 098fa4e
Showing
7 changed files
with
127 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM node:18-alpine as build | ||
|
||
COPY Beiming-System/frontend /learnware-frontend/ | ||
WORKDIR /learnware-frontend | ||
|
||
RUN npm install -g pnpm | ||
RUN pnpm config set registry https://registry.npmmirror.com/ | ||
RUN pnpm install | ||
RUN pnpm run build:admin | ||
|
||
FROM nginx:latest | ||
|
||
COPY --from=build /learnware-frontend/ /learnware-frontend/ | ||
|
||
EXPOSE 5173 | ||
|
||
COPY ./nginx_admin.conf /etc/nginx/nginx.conf | ||
|
||
CMD ["nginx", "-g", "daemon off;"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"redis": { | ||
"host": "redis", | ||
"port": 6379 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
user www-data; | ||
worker_processes auto; | ||
pid /run/nginx.pid; | ||
include /etc/nginx/modules-enabled/*.conf; | ||
|
||
events { | ||
worker_connections 768; | ||
} | ||
|
||
http { | ||
sendfile on; | ||
tcp_nopush on; | ||
tcp_nodelay on; | ||
keepalive_timeout 65; | ||
types_hash_max_size 2048; | ||
|
||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE | ||
ssl_prefer_server_ciphers on; | ||
|
||
access_log /var/log/nginx/access.log; | ||
error_log /var/log/nginx/error.log; | ||
|
||
gzip on; | ||
|
||
include /etc/nginx/conf.d/*.conf; | ||
|
||
client_max_body_size 50G; | ||
|
||
server { | ||
listen 5173; | ||
|
||
location / { | ||
root /learnware-frontend/packages/admin/dist; | ||
index index.html; | ||
try_files $uri $uri/ /index.html =404; | ||
|
||
if ($request_filename ~* ^.*?.(html|htm)$) { | ||
add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate"; | ||
} | ||
} | ||
|
||
location /assets { | ||
root /learnware-frontend/packages/admin/dist; | ||
} | ||
|
||
location /api { | ||
proxy_pass http:https://backend:8088/; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[global] | ||
index-url = https://pypi.tuna.tsinghua.edu.cn/simple | ||
# index-url = https://mirrors.aliyun.com/pypi/simple/ |