mirror of
https://github.com/iflytek/skillhub.git
synced 2026-10-02 02:13:52 +00:00
feat : 调整适配部署阿里云效-001
This commit is contained in:
parent
9ab32c260f
commit
551e6a9556
3 changed files with 7 additions and 5 deletions
|
|
@ -12,7 +12,7 @@ FROM jsessh-registry.cn-shanghai.cr.aliyuncs.com/base-images/nginx-skillhub:alpi
|
|||
# 限制 envsubst 只替换 SKILLHUB_ 开头的变量,避免覆盖 nginx 的 $uri $host 等变量
|
||||
# 设置默认值,部署时通过环境变量覆盖
|
||||
ENV SKILLHUB_API_UPSTREAM=${SKILLHUB_API_UPSTREAM:-http://skillhub-server-dev:8000}
|
||||
ENV SKILLHUB_WEB_API_BASE_URL=${SKILLHUB_WEB_API_BASE_URL:-http://sz-api.indusmind.local/skillhub-server}
|
||||
ENV SKILLHUB_WEB_API_BASE_URL=${SKILLHUB_WEB_API_BASE_URL:-http://sz-api.indusmind.local/skillhub-server/}
|
||||
ENV SKILLHUB_PUBLIC_BASE_URL=${SKILLHUB_PUBLIC_BASE_URL:-http://sz-api.indusmind.local/skillhub-web}
|
||||
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ function getRuntimeConfig(): RuntimeConfig {
|
|||
}
|
||||
|
||||
function getApiBaseUrl(): string {
|
||||
return getRuntimeConfig().apiBaseUrl || '/skillhub-server'
|
||||
return getRuntimeConfig().apiBaseUrl || '/skillhub-server/'
|
||||
}
|
||||
|
||||
function parseBooleanFlag(value: string | undefined): boolean {
|
||||
|
|
@ -253,7 +253,9 @@ function withBaseUrl(input: RequestInfo | URL): RequestInfo | URL {
|
|||
if (!baseUrl || typeof input !== 'string' || !input.startsWith('/')) {
|
||||
return input
|
||||
}
|
||||
return new URL(input, ensureTrailingSlash(baseUrl))
|
||||
const url = new URL(input, ensureTrailingSlash(baseUrl))
|
||||
// console.log('url info = ', url)
|
||||
return url
|
||||
}
|
||||
|
||||
export function buildApiUrl(path: string): string {
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ async function loadRuntimeConfig() {
|
|||
|
||||
function ensureRuntimeConfigFallback() {
|
||||
window.__SKILLHUB_RUNTIME_CONFIG__ ??= {
|
||||
apiBaseUrl: '/skillhub-server',
|
||||
appBaseUrl: '/skillhub-web',
|
||||
apiBaseUrl: '/skillhub-server/',
|
||||
appBaseUrl: '/skillhub-web/',
|
||||
authDirectEnabled: 'false',
|
||||
authDirectProvider: '',
|
||||
authSessionBootstrapEnabled: 'false',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue