@@ -0,0 +1,85 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: studio-manual-fe
|
||||
namespace: studio-system
|
||||
labels:
|
||||
app: studio-manual-fe
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: studio-manual-fe
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: studio-manual-fe
|
||||
spec:
|
||||
containers:
|
||||
- name: studio-manual-fe
|
||||
image: localhost:5000/studio-manual-fe:0.1.0
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
resources:
|
||||
requests:
|
||||
cpu: 25m
|
||||
memory: 32Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 20
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: studio-manual-fe
|
||||
namespace: studio-system
|
||||
labels:
|
||||
app: studio-manual-fe
|
||||
spec:
|
||||
selector:
|
||||
app: studio-manual-fe
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: http
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: studio-manual-fe-strip-prefix
|
||||
namespace: studio-system
|
||||
spec:
|
||||
stripPrefix:
|
||||
prefixes:
|
||||
- /manual
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: studio-manual-fe
|
||||
namespace: studio-system
|
||||
spec:
|
||||
entryPoints:
|
||||
- web
|
||||
routes:
|
||||
- match: Host(`portal.autonomystudio.net`) && PathPrefix(`/manual`)
|
||||
kind: Rule
|
||||
middlewares:
|
||||
- name: studio-manual-fe-strip-prefix
|
||||
services:
|
||||
- name: studio-manual-fe
|
||||
port: 80
|
||||
+1
-1
@@ -15,7 +15,7 @@ type ManualResponse = {
|
||||
documents?: ManualDocument[]
|
||||
}
|
||||
|
||||
const API_BASE_URL = (import.meta.env.VITE_MANUAL_API_BASE_URL || '/api').replace(/\/+$/, '')
|
||||
const API_BASE_URL = (import.meta.env.VITE_MANUAL_API_BASE_URL || `${import.meta.env.BASE_URL}api`).replace(/\/+$/, '')
|
||||
|
||||
function App(): React.JSX.Element {
|
||||
const [documents, setDocuments] = useState<ManualDocument[]>([])
|
||||
|
||||
+3
-1
@@ -2,12 +2,14 @@ import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
export default defineConfig({
|
||||
base: '/manual/',
|
||||
plugins: [react()],
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
'/manual/api': {
|
||||
target: 'http://localhost:4500',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/manual/, ''),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user