Merge branch 'release/1.0.0' of github.com:ONLYOFFICE/AppServer into release/1.0.0

This commit is contained in:
Viktor Fomin 2021-07-20 13:22:44 +03:00
commit 829edbbda5
21 changed files with 50 additions and 65 deletions

View File

@ -7,6 +7,8 @@ ARG REPO=mcr.microsoft.com/dotnet/sdk
FROM $REPO:$REPO_TAG AS base
ARG RELEASE_DATE="2016-06-21"
ARG DEBIAN_FRONTEND=noninteractive
ARG PRODUCT_VERSION=0.0.0
ARG BUILD_NUMBER=0
ARG GIT_BRANCH=master
ARG SRC_PATH
ARG BUILD_PATH
@ -40,6 +42,7 @@ RUN echo "nameserver 8.8.8.8" | tee /etc/resolv.conf > /dev/null && \
mkdir -p /app/onlyoffice/config/ && cp -rf config/* /app/onlyoffice/config/ && \
mkdir -p /etc/nginx/conf.d && cp -f config/nginx/onlyoffice*.conf /etc/nginx/conf.d/ && \
mkdir -p /etc/nginx/includes/ && cp -f config/nginx/includes/onlyoffice*.conf /etc/nginx/includes/ && \
sed -i "s/\"number\".*,/\"number\": \"${PRODUCT_VERSION}.${BUILD_NUMBER}\",/g" /app/onlyoffice/config/appsettings.json && \
sed -e 's/#//' -i /etc/nginx/conf.d/onlyoffice.conf && \
cd ${SRC_PATH}/build/install/common/ && \
bash build-frontend.sh -sp ${SRC_PATH} && \

View File

@ -1,3 +1,7 @@
#!/bin/bash
export SRV_VERSION=$DOCKER_TAG
docker-compose -f build.yml build --build-arg GIT_BRANCH=$SOURCE_BRANCH
BUILD_NUMBER="$(date "+%Y%m%d%H")"
docker-compose -f build.yml build \
--build-arg GIT_BRANCH=$SOURCE_BRANCH \
--build-arg PRODUCT_VERSION=$PRODUCT_VERSION \
--build-arg BUILD_NUMBER=$BUILD_NUMBER

View File

@ -45,6 +45,7 @@
"enabled": "enabled"
},
"version": {
"number": "1.0.0",
"release": {
"date": "",
"sign": ""

View File

@ -22,6 +22,11 @@ map $request_uri $header_x_frame_options {
default "SAMEORIGIN";
}
map $request_uri $cache_control {
default "";
~*^/(api\/2\.0.*|storage|login\.ashx|products\/.+\/httphandlers\/filehandler\.ashx|ChunkedUploader.ashx|apisystem|sh) "no-cache, no-store, must-revalidate";
}
include /etc/nginx/includes/onlyoffice-*.conf;
server {
@ -29,6 +34,8 @@ server {
add_header Access-Control-Allow-Origin *;
add_header X-Frame-Options $header_x_frame_options;
add_header Cache-Control $cache_control;
etag on;
large_client_header_buffers 4 16k;
@ -74,33 +81,28 @@ server {
}
location / {
proxy_pass http://localhost:5001;
expires 365d;
location ~* /(manifest.json|service-worker.js|appIcon.png|bg-error.png) {
expires 365d;
location ~* /(manifest.json|service-worker.js|appIcon.png|bg-error.png) {
root $public_root;
try_files /$basename /index.html =404;
}
location ~* /static/images/ {
expires 365d;
root $public_root;
try_files /images/$basename /index.html =404;
}
location ~* /static/offline/ {
expires 365d;
root $public_root;
try_files /offline/$basename /index.html =404;
}
location ~* /thirdparty/ {
expires 365d;
root $public_root;
try_files /thirdparty/third-party.html /index.html =404;
}
location ~* /static/locales/(?<content>[^/]+) {
expires 365d;
root $public_root;
try_files /locales/$content/$basename /index.html =404;
}
@ -108,12 +110,10 @@ server {
location /login {
#rewrite login/(.*) /$1 break;
expires 365d;
proxy_pass http://localhost:5011;
}
location /sockjs-node {
expires 365d;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
@ -128,26 +128,22 @@ server {
}
location /api/2.0 {
expires -1;
add_header Cache-Control $cache_control;
location ~* /(files|encryption|privacyroom) {
expires -1;
proxy_pass http://localhost:5007;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
location ~* /(people|group) {
expires -1;
proxy_pass http://localhost:5004;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
location ~* /(authentication|modules|portal|security|settings|smtpsettings|capabilities|thirdparty) {
expires -1;
proxy_pass http://localhost:5000;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
location ~* portal/(.*)(backup|restore)(.*) {
expires -1;
rewrite (.*)/portal/(.*) $1/backup/$2 break;
proxy_redirect off;
@ -158,44 +154,39 @@ server {
}
location ~* /backup {
expires -1;
proxy_pass http://localhost:5012;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
location ~* /project {
expires -1;
proxy_pass http://localhost:5020;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
location ~* /crm {
expires -1;
proxy_pass http://localhost:5021;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
location ~* /mail {
expires -1;
proxy_pass http://localhost:5022;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
location ~* /calendar {
expires -1;
proxy_pass http://localhost:5023;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
}
location /storage {
expires -1;
add_header Cache-Control $cache_control;
proxy_pass http://localhost:5003;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
location /login.ashx {
expires -1;
add_header Cache-Control $cache_control;
proxy_pass http://localhost:5003;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
@ -204,12 +195,10 @@ server {
location /products {
location ~* /people {
#rewrite products/people/(.*) /$1 break;
expires 365d;
proxy_pass http://localhost:5002;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
location ~* /(sockjs-node) {
expires 365d;
rewrite products/people(.*)/(sockjs-node)/(.*) /$2/$3 break;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
@ -226,7 +215,6 @@ server {
location ~* /(manifest.json|service-worker.js|appIcon.png|bg-error.png) {
expires 365d;
root $public_root;
try_files /$basename /index.html =404;
}
@ -234,7 +222,6 @@ server {
location ~* /files/doceditor {
#rewrite products/files/doceditor/(.*) /$1 break;
expires 365d;
proxy_pass http://localhost:5013;
proxy_redirect off;
proxy_set_header Host $host;
@ -248,12 +235,10 @@ server {
location ~* /files {
#rewrite products/files/(.*) /$1 break;
expires 365d;
proxy_pass http://localhost:5008;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
location ~* /sockjs-node {
expires 365d;
rewrite products/files(.*)/sockjs-node/(.*) /$2/$3 break;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
@ -268,13 +253,12 @@ server {
}
location ~* /(manifest.json|service-worker.js|appIcon.png|bg-error.png) {
expires 365d;
root $public_root;
try_files /$basename /index.html =404;
}
location ~* (/httphandlers/filehandler.ashx|ChunkedUploader.ashx) {
expires -1;
add_header Cache-Control $cache_control;
proxy_pass http://localhost:5007;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
@ -282,12 +266,10 @@ server {
location ~* /crm {
#rewrite products/crm/(.*) /$1 break;
expires 365d;
proxy_pass http://localhost:5014;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
location ~* /sockjs-node {
expires 365d;
rewrite products/crm(.*)/sockjs-node/(.*) /$2/$3 break;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
@ -303,13 +285,12 @@ server {
}
location ~* /(manifest.json|service-worker.js|appIcon.png|bg-error.png) {
expires 365d;
root $public_root;
try_files /$basename /index.html =404;
}
location ~* (/httphandlers/filehandler.ashx|ChunkedUploader.ashx) {
expires -1;
add_header Cache-Control $cache_control;
proxy_pass http://localhost:5007;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
@ -317,12 +298,10 @@ server {
location ~* /projects {
#rewrite products/projects/(.*) /$1 break;
expires 365d;
proxy_pass http://localhost:5015;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
location ~* /sockjs-node {
expires 365d;
rewrite products/projects(.*)/sockjs-node/(.*) /$2/$3 break;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
@ -338,13 +317,12 @@ server {
}
location ~* /(manifest.json|service-worker.js|appIcon.png|bg-error.png) {
expires 365d;
root $public_root;
try_files /$basename /index.html =404;
}
location ~* (/httphandlers/filehandler.ashx|ChunkedUploader.ashx) {
expires -1;
add_header Cache-Control $cache_control;
proxy_pass http://localhost:5007;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
@ -352,12 +330,10 @@ server {
location ~* /mail {
#rewrite products/mail/(.*) /$1 break;
expires 365d;
proxy_pass http://localhost:5016;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
location ~* /sockjs-node {
expires 365d;
rewrite products/projects(.*)/sockjs-node/(.*) /$2/$3 break;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
@ -373,13 +349,12 @@ server {
}
location ~* /(manifest.json|service-worker.js|appIcon.png|bg-error.png) {
expires 365d;
root $public_root;
try_files /$basename /index.html =404;
}
location ~* (/httphandlers/filehandler.ashx|ChunkedUploader.ashx) {
expires -1;
add_header Cache-Control $cache_control;
proxy_pass http://localhost:5007;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
@ -387,12 +362,10 @@ server {
location ~* /calendar {
#rewrite products/calendar/(.*) /$1 break;
expires 365d;
proxy_pass http://localhost:5017;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
location ~* /sockjs-node {
expires 365d;
rewrite products/projects(.*)/sockjs-node/(.*) /$2/$3 break;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
@ -408,13 +381,12 @@ server {
}
location ~* /(manifest.json|service-worker.js|appIcon.png|bg-error.png) {
expires 365d;
root $public_root;
try_files /$basename /index.html =404;
}
location ~* (/httphandlers/filehandler.ashx|ChunkedUploader.ashx) {
expires -1;
add_header Cache-Control $cache_control;
proxy_pass http://localhost:5007;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
@ -422,14 +394,14 @@ server {
}
location /apisystem {
expires -1;
add_header Cache-Control $cache_control;
rewrite apisystem/(.*) /$1 break;
proxy_pass http://localhost:5010;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
location /sh {
expires -1;
add_header Cache-Control $cache_control;
rewrite sh/(.*) /$1 break;
proxy_pass http://localhost:9999;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;

View File

@ -1,5 +1,5 @@
{
"version": "0.1.10",
"version": "1.0.0",
"npmClient": "yarn",
"packages": [
"packages/asc-web-components",

View File

@ -1,6 +1,6 @@
{
"name": "@appserver/common",
"version": "0.1.10",
"version": "1.0.0",
"private": true,
"scripts": {
"build": "echo 'skip it'",

View File

@ -82,6 +82,7 @@ class SettingsStore {
appId: "",
measurementId: "",
};
version = "";
constructor() {
makeAutoObservable(this);

View File

@ -1,6 +1,6 @@
{
"name": "@appserver/components",
"version": "0.1.10",
"version": "1.0.0",
"private": true,
"scripts": {
"build": "echo 'skip it'",

View File

@ -1,6 +1,6 @@
{
"name": "@appserver/crm",
"version": "0.1.10",
"version": "1.0.0",
"homepage": "/products/crm",
"title": "ONLYOFFICE",
"id": "6743007c-6f95-4d20-8c88-a8601ce5e76d",

View File

@ -1,6 +1,6 @@
{
"name": "@appserver/calendar",
"version": "0.1.10",
"version": "1.0.0",
"homepage": "/products/calendar",
"id": "32d24cb5-7ece-4606-9c94-19216ba42086",
"title": "ONLYOFFICE",

View File

@ -1,6 +1,6 @@
{
"name": "@appserver/files",
"version": "0.1.10",
"version": "1.0.0",
"homepage": "/products/files",
"id": "e67be73d-f9ae-4ce1-8fec-1880cb518cb4",
"title": "ONLYOFFICE",

View File

@ -195,8 +195,9 @@ class PureHome extends React.Component {
secondaryProgressDataStoreIcon,
selectionLength,
selectionTitle,
firstLoad,
} = this.props;
if (isLoading !== prevProps.isLoading) {
if (isLoading !== prevProps.isLoading && !firstLoad) {
if (isLoading) {
showLoader();
} else {

View File

@ -1,6 +1,6 @@
{
"name": "@appserver/mail",
"version": "0.1.10",
"version": "1.0.0",
"homepage": "/products/mail",
"id": "2a923037-8b2d-487b-9a22-5ac0918acf3f",
"title": "ONLYOFFICE",

View File

@ -1,6 +1,6 @@
{
"name": "@appserver/people",
"version": "0.1.10",
"version": "1.0.0",
"homepage": "/products/people",
"id": "f4d98afd-d336-4332-8778-3c6945c81ea0",
"title": "ONLYOFFICE",

View File

@ -1,6 +1,6 @@
{
"name": "@appserver/projects",
"version": "0.1.10",
"version": "1.0.0",
"homepage": "/products/projects",
"id": "1e044602-43b5-4d79-82f3-fd6208a11960",
"title": "ONLYOFFICE",

View File

@ -300,7 +300,8 @@ namespace ASC.Api.Settings
{
Culture = Tenant.GetCulture().ToString(),
GreetingSettings = Tenant.Name,
Personal = CoreBaseSettings.Personal
Personal = CoreBaseSettings.Personal,
Version = Configuration["version:number"] ?? ""
};
if (AuthContext.IsAuthenticated)

View File

@ -67,6 +67,8 @@ namespace ASC.Api.Settings
public FirebaseWrapper Firebase { get; set; }
public string Version { get; set; }
public static SettingsWrapper GetSample()
{
return new SettingsWrapper

View File

@ -1,6 +1,6 @@
{
"name": "@appserver/studio",
"version": "0.1.10",
"version": "1.0.0",
"homepage": "",
"title": "ONLYOFFICE",
"scripts": {

View File

@ -7,7 +7,6 @@ import styled from "styled-components";
import { isMobile } from "react-device-detect";
import { setDocumentTitle } from "../../../helpers/utils";
import i18n from "./i18n";
import config from "../../../../package.json";
import withLoader from "../Confirm/withLoader";
import { inject, observer } from "mobx-react";
import { ReactSVG } from "react-svg";
@ -78,7 +77,7 @@ const VersionStyle = styled.div`
padding: 8px 0px 20px 0px;
`;
const Body = ({ t, personal }) => {
const Body = ({ t, personal, version }) => {
useEffect(() => {
setDocumentTitle(t("Common:About"));
}, [t]);
@ -124,7 +123,7 @@ const Body = ({ t, personal }) => {
<VersionStyle>
<Text className="text_style" fontSize="14px" color="#A3A9AE">
{`${t("Common:Version")}: ${config.version}`}
{`${t("Common:Version")}: ${version}`}
</Text>
</VersionStyle>
@ -198,6 +197,7 @@ const Body = ({ t, personal }) => {
const BodyWrapper = inject(({ auth }) => ({
personal: auth.settingsStore,
version: auth.settingsStore.version,
}))(withTranslation(["About", "Common"])(withLoader(observer(Body))));
const About = (props) => {

View File

@ -1,6 +1,6 @@
{
"name": "@appserver/editor",
"version": "0.1.10",
"version": "1.0.0",
"homepage": "/products/files/doceditor",
"title": "ONLYOFFICE",
"scripts": {

View File

@ -1,6 +1,6 @@
{
"name": "@appserver/login",
"version": "0.1.10",
"version": "1.0.0",
"homepage": "/login",
"title": "ONLYOFFICE",
"scripts": {