commit
57d1c50b9a
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: Build and Push Multi-Platform Docker Image
|
||||
name: Build Docker Image
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
2
.github/workflows/nightly-build.yml
vendored
2
.github/workflows/nightly-build.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: Build and Push Multi-Platform Docker Image
|
||||
name: Build Nightly Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
@ -6,6 +6,8 @@ COPY nginx.conf /etc/nginx/nginx.conf.template
|
||||
|
||||
COPY dist /var/www/public
|
||||
|
||||
COPY config.js.template /var/www/public/config.js.template
|
||||
|
||||
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||
RUN chmod +x /docker-entrypoint.sh
|
||||
|
||||
|
||||
4
config.js.template
Normal file
4
config.js.template
Normal file
@ -0,0 +1,4 @@
|
||||
window._env_ = {
|
||||
API_URL: "${API_URL}",
|
||||
API_OFFICE_URL: "${API_OFFICE_URL}"
|
||||
};
|
||||
@ -1,8 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# 使用envsubst命令替换nginx.conf.template文件中的环境变量
|
||||
envsubst '$API_BASE_URL $API_DRAWIO_URL $API_OFFICE_URL' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
|
||||
|
||||
# 启动Nginx
|
||||
echo "API_URL: $API_URL"
|
||||
echo "API_OFFICE_URL: $API_OFFICE_URL"
|
||||
envsubst '${API_URL} ${API_OFFICE_URL}' < /var/www/public/config.js.template > /var/www/public/config.js
|
||||
cat /var/www/public/config.js
|
||||
exec "$@"
|
||||
|
||||
4
public/config.js
Normal file
4
public/config.js
Normal file
@ -0,0 +1,4 @@
|
||||
window._env_ = {
|
||||
API_URL: "",
|
||||
API_OFFICE_URL: "",
|
||||
};
|
||||
@ -35,7 +35,7 @@
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= webpackConfig.name %></title>
|
||||
<link rel="stylesheet" href="<%= htmlWebpackPlugin.options.path %>/resource/font-awesome/free-6.4.2/css/all.min.css">
|
||||
|
||||
<script src="/config.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
|
||||
@ -2690,6 +2690,9 @@ export default {
|
||||
this.path = basePath + path
|
||||
this.path = this.path.replace(/\\/g, '/')
|
||||
this.path = this.path.replace(/\/\//g, '/')
|
||||
if (this.path === '/') {
|
||||
this.path = ''
|
||||
}
|
||||
|
||||
this.$store.dispatch('updateMessage', {event: 'storageTypeChange', data: storageType})
|
||||
},
|
||||
|
||||
@ -322,7 +322,7 @@ export default {
|
||||
top: 2.5rem;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
height: calc(100% - 2.5rem);
|
||||
|
||||
>>>.dark-button {
|
||||
background: #3e3e3e;
|
||||
|
||||
@ -241,7 +241,8 @@ export default {
|
||||
lang: "zh",
|
||||
user: {
|
||||
id: this.$store.state.user.userId,
|
||||
name: this.$store.state.user.name
|
||||
name: this.$store.state.user.name,
|
||||
image: `${window.location.origin}${process.env.VUE_APP_BASE_API}/public/s/view/thumbnail?id=${this.$store.state.user.avatar}`
|
||||
},
|
||||
customization: {
|
||||
autosave: false,
|
||||
|
||||
@ -13,11 +13,13 @@ export default {
|
||||
},
|
||||
// office api url
|
||||
officeApiUrl: function() {
|
||||
return `${window.location.origin}/office/web-apps/apps/api/documents/api.js`
|
||||
const url = window._env_.API_OFFICE_URL || process.env.API_OFFICE_URL || `${window.location.origin}/office`
|
||||
return `${url}/web-apps/apps/api/documents/api.js`
|
||||
},
|
||||
// office回调url
|
||||
officeCallBackUrl: function(token, username, fileId) {
|
||||
return `http://jmalcloud:8088/office/track?jmal-token=${token}&name=${username}&fileId=${fileId}`
|
||||
const url = window._env_.API_URL || process.env.API_URL || 'http://jmalcloud:8088'
|
||||
return `${url}/office/track?jmal-token=${token}&name=${username}&fileId=${fileId}`
|
||||
},
|
||||
// 预览文件的url
|
||||
previewUrl: function(username, file, token, shareToken) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user