Merge branch 'dev' of https://github.com/logspace-ai/langflow into dev
This commit is contained in:
commit
f56dcc03b0
147 changed files with 14203 additions and 1842 deletions
|
|
@ -1,10 +1,16 @@
|
|||
FROM node:14-alpine as frontend_build
|
||||
ARG BACKEND
|
||||
FROM node:20-alpine as frontend_build
|
||||
ARG BACKEND_URL
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
|
||||
COPY ./package.json ./package-lock.json ./tsconfig.json ./vite.config.ts ./index.html ./tailwind.config.js ./postcss.config.js ./prettier.config.js /app/
|
||||
RUN npm install
|
||||
COPY ./src /app/src
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx
|
||||
COPY --from=frontend_build /app/build/ /usr/share/nginx/html
|
||||
COPY /nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY /nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY start-nginx.sh /start-nginx.sh
|
||||
RUN chmod +x /start-nginx.sh
|
||||
ENV BACKEND_URL=$BACKEND_URL
|
||||
CMD ["/start-nginx.sh"]
|
||||
|
|
@ -1,18 +1,20 @@
|
|||
server {
|
||||
gzip on;
|
||||
gzip_comp_level 2;
|
||||
gzip_min_length 1000;
|
||||
gzip_types text/xml text/css;
|
||||
gzip_http_version 1.1;
|
||||
gzip_vary on;
|
||||
gzip_disable "MSIE [4-6] \.";
|
||||
gzip on;
|
||||
gzip_comp_level 2;
|
||||
gzip_min_length 1000;
|
||||
gzip_types text/xml text/css;
|
||||
gzip_http_version 1.1;
|
||||
gzip_vary on;
|
||||
gzip_disable "MSIE [4-6] \.";
|
||||
|
||||
listen 80;
|
||||
listen 80;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
try_files $uri $uri/ /index.html =404;
|
||||
}
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
try_files $uri $uri/ /index.html =404;
|
||||
}
|
||||
|
||||
|
||||
include /etc/nginx/extra-conf.d/*.conf;
|
||||
}
|
||||
|
|
|
|||
8458
src/frontend/package-lock.json
generated
8458
src/frontend/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -73,7 +73,7 @@
|
|||
"start": "vite",
|
||||
"build": "vite build",
|
||||
"serve": "vite preview",
|
||||
"format": "npx prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
|
||||
"format": "npx prettier --write \"./**/*.{js,jsx,ts,tsx,json,md}\"",
|
||||
"type-check": "tsc --noEmit --pretty --project tsconfig.json && vite"
|
||||
},
|
||||
"eslintConfig": {
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ export default function AdminPage() {
|
|||
|
||||
function getUsers() {
|
||||
setLoadingUsers(true);
|
||||
getUsersPage(index, size)
|
||||
getUsersPage(index - 1, size)
|
||||
.then((users) => {
|
||||
setTotalRowsCount(users["total_count"]);
|
||||
userList.current = users["users"];
|
||||
|
|
|
|||
8
src/frontend/start-nginx.sh
Normal file
8
src/frontend/start-nginx.sh
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Replace the placeholder with the actual value
|
||||
sed -i "s|__BACKEND_URL__|$BACKEND_URL|g" /etc/nginx/conf.d/default.conf
|
||||
|
||||
|
||||
# Start nginx
|
||||
exec nginx -g 'daemon off;'
|
||||
Loading…
Add table
Add a link
Reference in a new issue