This commit is contained in:
parent
392bfcccaa
commit
e81b7abd1a
12
Dockerfile
12
Dockerfile
@ -1,4 +1,4 @@
|
|||||||
FROM node:alpine
|
FROM node:alpine as builder
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@ -9,9 +9,13 @@ COPY tsconfig.json .
|
|||||||
|
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
COPY --chmod=111 startup.sh .
|
|
||||||
|
|
||||||
COPY public public
|
COPY public public
|
||||||
COPY src src
|
COPY src src
|
||||||
|
|
||||||
ENTRYPOINT [ "/usr/bin/env", "./startup.sh" ]
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM node:alpine
|
||||||
|
COPY --from=builder /app/build /opt/server
|
||||||
|
WORKDIR /opt/server
|
||||||
|
ENTRYPOINT [ "npx", "-y" , "serve", "-s", "/opt/server" ]
|
||||||
|
|
||||||
|
803
package-lock.json
generated
803
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
1
public/config.js
Normal file
1
public/config.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
var API_URL = "http://localhost"
|
@ -3,6 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="icon" href="%PUBLIC_URL%/favicon.svg"/>
|
<link rel="icon" href="%PUBLIC_URL%/favicon.svg"/>
|
||||||
|
<script type="text/javascript" src="%PUBLIC_URL%/config.js"></script>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="theme-color" content="#000000" />
|
<meta name="theme-color" content="#000000" />
|
||||||
<meta
|
<meta
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import axios, { AxiosInstance, AxiosResponse } from "axios";
|
import axios, { AxiosInstance, AxiosResponse } from "axios";
|
||||||
import React, { Context, Dispatch, ReactNode, createContext, useContext, useState } from "react";
|
import React, { Context, Dispatch, ReactNode, createContext, useContext, useState } from "react";
|
||||||
import { useLocation, Navigate } from "react-router-dom";
|
import { useLocation, Navigate } from "react-router-dom";
|
||||||
import Cookies from 'js-cookie'
|
import Cookies from 'js-cookie';
|
||||||
import { Box, Button, ButtonGroup, ButtonOwnProps, Modal, PaletteMode, Paper, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, TextField } from "@mui/material";
|
import { Box, Button, ButtonGroup, ButtonOwnProps, Modal, PaletteMode, Paper, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, TextField } from "@mui/material";
|
||||||
import { Form } from "@rjsf/mui";
|
import { Form } from "@rjsf/mui";
|
||||||
import validator from '@rjsf/validator-ajv8';
|
import validator from '@rjsf/validator-ajv8';
|
||||||
@ -86,10 +86,9 @@ export const getDesignTokens = (mode: PaletteMode) => ({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const API_URL = `${process.env.REACT_APP_API_SCHEME}://${process.env.REACT_APP_API_URL}`
|
const API_URL = (window as any).API_URL
|
||||||
|
|
||||||
axios.defaults.withCredentials = true
|
axios.defaults.withCredentials = true
|
||||||
|
|
||||||
export const api: AxiosInstance = axios.create({
|
export const api: AxiosInstance = axios.create({
|
||||||
baseURL: API_URL,
|
baseURL: API_URL,
|
||||||
withCredentials: true,
|
withCredentials: true,
|
||||||
@ -171,7 +170,8 @@ function CustomField(props: WidgetProps){
|
|||||||
{ label: 'Create', value: Permission.Create },
|
{ label: 'Create', value: Permission.Create },
|
||||||
{ label: 'Admin', value: Permission.Admin },
|
{ label: 'Admin', value: Permission.Admin },
|
||||||
{ label: 'Cloud', value: Permission.Cloud },
|
{ label: 'Cloud', value: Permission.Cloud },
|
||||||
]}} registry={registry} value={convertNumber(props.value)} />
|
]
|
||||||
|
}} registry={registry} value={convertNumber(props.value)} />
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options2 === null) {
|
if (options2 === null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user