From ca21debc34d845e5f245a2fd63f50b592821eb11 Mon Sep 17 00:00:00 2001 From: Chenyujie <44333047+chenyujie0116@users.noreply.github.com> Date: Fri, 8 Oct 2021 09:38:58 +0800 Subject: [PATCH] Initial commit --- .env | 33 ++++ .github/ISSUE_TEMPLATE/bug_report.md | 96 ++++++++++ .../ISSUE_TEMPLATE/documentation_report.md | 41 +++++ .github/ISSUE_TEMPLATE/feature_request.md | 25 +++ .github/workflows/mirror.yml | 56 ++++++ .github/workflows/templating.yml | 24 +++ .gitignore | 0 CHANGELOG.md | 5 + LICENSE.md | 168 ++++++++++++++++++ Notes.md | 6 + README-zh.jinja2 | 142 +++++++++++++++ README.jinja2 | 134 ++++++++++++++ docker-compose.yml | 112 ++++++++++++ src/filelist | 3 + variables.json | 76 ++++++++ 15 files changed, 921 insertions(+) create mode 100644 .env create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/documentation_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/workflows/mirror.yml create mode 100644 .github/workflows/templating.yml create mode 100644 .gitignore create mode 100644 CHANGELOG.md create mode 100644 LICENSE.md create mode 100644 Notes.md create mode 100644 README-zh.jinja2 create mode 100644 README.jinja2 create mode 100644 docker-compose.yml create mode 100644 src/filelist create mode 100644 variables.json diff --git a/.env b/.env new file mode 100644 index 0000000..176e04c --- /dev/null +++ b/.env @@ -0,0 +1,33 @@ +# COMMENT +DB_MYSQL_VERSION=5.7 +DB_MYSQL_PORT=3306 +DB_MYSQL_PASSWORD=123456 +DB_MYSQL_NAME=drupal +DB_MYSQL_USER=drupal +DB_MYSQL_HOST=mysql + +MQ_KAFKA_PORT=9092 +MQ_RABBITMQ_PORT=5672 + +DB_POSTGRESQL_VERSION=9.5 +DB_REDIS_VERSION=5.0 + +APP_VERSION=latest +APP_PORT=9001 + +# more than two ports +APP_HTTP_PORT=9001 +APP_SSH_PORT=9002 + +APP_PASSWORD_INIT=True +APP_USER= +APP_PASSWORD= +APP_CONTAINER_NAME=onlyoffice +APP_NETWORK=onlyoffice +APP_SITE_NAME=Gost blog +APP_SITE_URL=appname.example.com + +VOLUMES_PATH_PREFIX=./volumes +DOMAIN=appname.example.com +EMAIL=help@websoft9.com + diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..33cfce1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,96 @@ +--- +name: Bug report +about: Report a bug encountered while using websoft9's product +labels: bug +--- + +**Describe the bug** + +A clear and concise description of what the bug is. + +## Deployment method + +- [ ] subscription image from MarketPlace of Cloud +- [ ] All-in-one Installer +- [ ] ansible-playbook cli +- [ ] mcloud +- [ ] create instance from private image + +## Bug source + +- [ ] Bugs from installation +- [ ] Bugs from first use +- [ ] Other (You should describe it) + +## System Environment + +**Application Version** + +e.g v4.5 + +**OS** + +- [ ] Ubuntu18.x +- [ ] Ubuntu20.x +- [ ] CentOS7.x +- [ ] CentOS8.x +- [ ] AmazonLinux2 +- [ ] OracleLinux7.8 +- [ ] OracleLinux8.2 +- [ ] Other (You should describe it) + +**Cloud PlatForm** + +- [ ] Azure +- [ ] Aws +- [ ] 阿里云 +- [ ] 腾讯云 +- [ ] 华为云 +- [ ] AlibabaCloud +- [ ] HUWEICloud +- [ ] Other (You should describe it) + + +## Bug reproduce + +Steps to reproduce the behavior: + +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +## Bug reports + +### Bug Context + +Bug context includes bug error, error logs and service status, it is very important for resolving issue + +``` +# bug error +(paste here) + +# service status +(paste here) + +# error logs +(paste here) +``` + +### Bug Screenshot + +paste screenshot here + +## Your suggestion + +**The reason of Bug** + +You can describe the reason if you have found it + +**Your solution for Bug** + +You can describe your solution here + +**Additional context** + +You can add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/documentation_report.md b/.github/ISSUE_TEMPLATE/documentation_report.md new file mode 100644 index 0000000..bff1e87 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation_report.md @@ -0,0 +1,41 @@ +--- +name: Documentation report +about: improve current Documentation +labels: documentation +--- + + +## Language + +- [ ] Chinese +- [ ] English + +## Content error + +Provide us with documentation errors, e.g spelling mistake, wrong screenshot, code syntax error. + +* URL: +* Description: +* Screenshot + +## Content optimization + +Provide us with content optimization, e.g easy to read, simplify the steps, step by step, precise expression. + +* URL: +* Description: + +## New content + +Describe important content what do you think is important in this documentation. + +**What content do you want to add?** + +(describe here) + +**Steps for the content** + +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. Modify file '....' diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..e7c4085 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,25 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: 'enhancement' +assignees: '' + +--- + +**What type of your feature request?** + +- [ ] Add new features +- [ ] Improve current features + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml new file mode 100644 index 0000000..9ce1edb --- /dev/null +++ b/.github/workflows/mirror.yml @@ -0,0 +1,56 @@ +name: Mirror to Gitee Repo + +# on: [ push, delete, create ] +on: + push: + branches: + - main + +jobs: + git-mirror: + runs-on: ubuntu-latest + steps: + - name: Configure Private Key + env: + SSH_PRIVATE_KEY: ${{ secrets.GITEE_PRIVATE_KEY }} + run: | + mkdir -p ~/.ssh + echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + echo "StrictHostKeyChecking no" >> ~/.ssh/config + - name: Push Mirror + env: + # SOURCE_REPO: 'https://github.com/mgithubTestOrg/giteeMirror.git' + SOURCE_REPO: 'https://github.com/${{ github.repository }}.git' + # DESTINATION_REPO: 'git@gitee.com:mgithubTestOrg/giteeMirror.git' +# DESTINATION_REPO: 'git@gitee.com:${{ github.repository }}.git' + DESTINATION_REPO: 'git@gitee.com:websoft9/${{ github.event.repository.name }}.git' + BASE_REPO: 'https://github.com/${{ github.repository }}' + run: | + git clone "$SOURCE_REPO" && cd `basename "$BASE_REPO"` + git config --global user.name "${{ github.actor }}" + git config --global user.email "xxx@websoft9.com" + + git remote set-url --push origin "$DESTINATION_REPO" + git push origin main --force + + git checkout dev + if [ -f "requirements.yml" ];then + sed -i 's/github/gitee/g' requirements.yml + git add requirements.yml + git commit -m "Make requirements.yml compatible with gitee" + fi + git push origin dev --force + + git checkout main + + git fetch -p origin + git for-each-ref --format 'delete %(refname)' refs/pull | git update-ref --stdin + git push origin main --force + + if [ -f "requirements.yml" ];then + sed -i 's/github/gitee/g' requirements.yml + git add requirements.yml + git commit -m "Make requirements.yml compatible with gitee" + fi + git push origin main --force \ No newline at end of file diff --git a/.github/workflows/templating.yml b/.github/workflows/templating.yml new file mode 100644 index 0000000..d542eeb --- /dev/null +++ b/.github/workflows/templating.yml @@ -0,0 +1,24 @@ +name: Template README by variables.json + +on: + repository_dispatch: + push: + paths: [variables.json, Notes.md, docker-compose.yml, CHANGELOG.md, .env] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + + - name: npm install jinjia2-cli + run: | + wget -N https://raw.githubusercontent.com/Websoft9/docker-template/main/README.jinja2 -O template_README.jinja2 + wget -N https://raw.githubusercontent.com/Websoft9/docker-template/main/README-zh.jinja2 -O template_README-zh.jinja2 + pip install jinja2-cli + jinja2 template_README-zh.jinja2 variables.json > README-zh.md + jinja2 template_README.jinja2 variables.json > README.md + + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Templating README diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..582cf46 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# CHANGELOG + +## Release +### Fixes and Enhancements + diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..6117e88 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,168 @@ +This program is released under LGPL-3.0 and with the additional Terms: +It is not allowed to publish free or paid image based on this program in any Cloud platform's Marketplace. + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/Notes.md b/Notes.md new file mode 100644 index 0000000..f8ed8ae --- /dev/null +++ b/Notes.md @@ -0,0 +1,6 @@ +## About + +This repository is forked from ONLYOFFICE/Docker-CommunityServer, we have the following modifications are provided + +* replace README.md +* add README-zh.md, CHANGELOG.md, Note.md, License.md, docker-compose.yml,.env, src, .github folder diff --git a/README-zh.jinja2 b/README-zh.jinja2 new file mode 100644 index 0000000..874c4e6 --- /dev/null +++ b/README-zh.jinja2 @@ -0,0 +1,142 @@ +# {{trademark}} on Docker + +![](https://libs.websoft9.com/common/websoft9-cloud-installer.png) + +## 简介 + +[简体中文](/README-zh.md) | [English](/README.md) + +本项目是由 [Websoft9](https://www.websoft9.com) 研发的 **云原生程序** ,大大简化 {{trademark}} 复杂的安装及配置。 + +## 系统要求 + +安装本项目,确保符合如下的条件([详细参考]({{requirements.url}})): + +* **操作系统**: Red Hat, CentOS, Debian, Ubuntu 等主流 Linux等 操作系统 +* **公有云**: AWS, Azure, Google Cloud, 阿里云, 腾讯云, 华为云等20多个全球主流云 +* **私有云**: KVM, VMware, VirtualBox, OpenStack 等主流虚拟化架构 +* **CPU架构**: {{requirements.cpu_arch}} +* **内存**: {{requirements.memory}}GB以上 +* **CPU**: {{requirements.cpu}}核以上 +* **存储**: {{requirements.disk}}GB以上 +* **Swap分区**: {{requirements.swap}}GB以上 +* **带宽**: 100M以上体验更流畅 + +## 安装使用 + +### 自动安装(推荐) + +登录 Linux,运行下面的**自动化命令**即可启动安装并显示安装结果。 + +``` +sudo wget -N https://raw.githubusercontent.com/Websoft9/StackHub/main/docker-installer.sh; sudo bash docker-installer.sh -r {{name}} + +``` + +### package包安装 + +1.生成package包 +登录 Linux,运行下面的**自动化命令**即可生成所需的package包。 +``` +sudo wget -N https://raw.githubusercontent.com/Websoft9/StackHub/main/docker-installer.sh; sudo bash docker-installer.sh -r {{name}} -p +``` +2.复制package包后安装 + +将压缩的package包复制到想要安装的服务器或虚拟机,登录 Linux,运行下面的**自动化命令**即可启动安装并显示安装结果。 +``` +sudo bash install-{{name}} +``` + +### 手动安装 + +如果熟悉 Linux 以及 Docker,可以采用手动安装的方式 + +#### 准备 Docker 环境 + +如果您的服务器尚未安装 Docker,请使用如下命令安装它: + +``` +curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh +curl -L "https://github.com/docker/compose/releases/download/1.29.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose +sudo chmod +x /usr/local/bin/docker-compose +ln -sf /usr/local/bin/docker-compose /usr/bin +sudo systemctl start docker +``` + +#### 安装 {{trademark}} + +直接运行下面的命令快速安装应用。如果你熟悉 Docker,建议先修改 [docker-compose](docker-compose-production.yml) 文件以满足自己的需求 + +``` +git clone --depth=1 https://github.com/Websoft9/docker-{{name}} +cd docker-{{name}} +{% if command_extra is defined -%} +{% for cmd in command_extra -%} +{{cmd.cmd}} +{% endfor -%} +{% endif -%} +{% if command_comments is defined -%} +{% for comment in command_comments -%} +# {{comment.comment_cn}} +{% endfor -%} +{% endif -%} +sudo docker-compose -f {{compose_file}} {% if env_file is defined -%} --env-file {{env_file}} {% endif -%} up -d +``` + +### 常见问题 + +#### 安装 {{trademark}} 前需要更改密码吗? + +是的, 在生产环境中,您应该在 docker-compose 文件中修改所有数据库密码和应用程序密码 + +#### 端口冲突导致无法启动? + +修改 [docker-compose]({{compose_file}}) 文件中冲突的端口,然后再启动容器 + + +{% for faq in faqs -%} +#### {{faq.question_cn}} +{{faq.answer_cn}} + +{% endfor -%} + + +### 使用说明 + +启动应用后,本地浏览器访问 URL: *`http://服务器公网IP:{{services[0].port}}`* 进入应用。 + +下面是使用过程中可能需要的信息 + +{% if user is defined -%} +#### 账号 + +本应用默认安装后的管理员用户名和密码如下: + +| 用户名 | 密码 | +| ------- | -------- | +| {{user.username}} | {{user.password}} | + +{% endif -%} + +#### 服务和端口 + +| 名称 | 端口号 | 用途 | 必要性 | +| --- | --- | --- | --- | +{% for service in services -%} +| {{service.name}} | {{service.port}} | {{service.description_cn}} | {{service.required}} | +{% endfor -%} + + +## 文档 + +[{{trademark}} 管理员手册](https://support.websoft9.com/docs/{{name}}) + +## 企业级支持 + +如果需要企业级支持,请订阅我们提供的 [{{trademark}} 企业级支持版](https://apps.websoft9.com/{{name}}) + +订阅企业级产品后,您可获得: + +* 精准知识:产品专家的解答和指导 +* 全面支持:技术支持所需的一切,例如启用HTTPS、升级指南 +* 安全顾问:安全服务和工具,可提高您软件的安全性 \ No newline at end of file diff --git a/README.jinja2 b/README.jinja2 new file mode 100644 index 0000000..f7e744d --- /dev/null +++ b/README.jinja2 @@ -0,0 +1,134 @@ +# {{trademark}} on Docker + +![](https://libs.websoft9.com/common/websott9-cloud-installer.png) + +## Introduction + +[English](/README.md) | [简体中文](/README-zh.md) + +This repository is an **Cloud Native solution** powered by [Websoft9](https://www.websoft9.com), it simplifies the complicated installation and initialization process. + +## System Requirements + +The following are the minimal [recommended requirements]({{requirements.url}}): + +* **OS**: Red Hat, CentOS, Debian, Ubuntu or other's Linux OS +* **Public Cloud**: More than 20+ major Cloud such as AWS, Azure, Google Cloud, Alibaba Cloud, HUAWEIClOUD, Tencent Cloud +* **Private Cloud**: KVM, VMware, VirtualBox, OpenStack +* **ARCH**: {{requirements.cpu_arch}} +* **RAM**: {{requirements.memory}} GB or more +* **CPU**: {{requirements.cpu}} cores or higher +* **HDD**: at least {{requirements.disk}} GB of free space +* **Swap file**: at least {{requirements.swap}} GB +* **bandwidth**: more fluent experience over 100M + +## QuickStart + +### All-in-one Installer + +Use SSH to connect your instance and run the automatic installation script below + +``` +sudo wget -N https://raw.githubusercontent.com/Websoft9/StackHub/main/docker-installer.sh; sudo bash docker-installer.sh -r {{name}} +``` +### package install + +1.Make package +You can get the package as following script +``` +sudo wget -N https://raw.githubusercontent.com/Websoft9/StackHub/main/docker-installer.sh; sudo bash docker-installer.sh -r {{name}} -p +``` + +2.Install by package +Copy package to your server, Use SSH to connect your instance and run the automatic installation script below +``` +sudo bash install-{{name}} +``` + +### Manual Installation + +#### Preparation + +If you have not install Docker and Docker-Compose, refer to the following commands to install it: + +``` +curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh +curl -L "https://github.com/docker/compose/releases/download/1.29.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose +sudo chmod +x /usr/local/bin/docker-compose +ln -sf /usr/local/bin/docker-compose /usr/bin +sudo systemctl start docker +``` + +#### Install {{trademark}} + +We assume that you are already familiar with Docker, and you can modify [docker-compose file]({{compose_file}}) by yourself + +``` +git clone --depth=1 https://github.com/Websoft9/docker-{{name}} +cd docker-{{name}} +{% if command_extra is defined -%} +{% for cmd in command_extra -%} +{{cmd.cmd}} +{% endfor -%} +{% endif -%} +{% if command_comments is defined -%} +{% for comment in command_comments -%} +# {{comment.comment_en}} +{% endfor -%} +{% endif -%} +docker-compose -f {{compose_file}} {% if env_file is defined -%} --env-file {{env_file}} {% endif -%} up -d +``` + +### FAQ + +#### Do I need to change the password before docker-compose up? +Yes, you should modify all database password and application password at docker-compose file for production + +#### Docker runing failed for the reason that port conflict? +You should modify ports at [docker-compose file](docker-compose-production.yml) and docker-compose again + +{% for faq in faqs -%} +#### {{faq.question_en}} +{{faq.answer_en}} + +{% endfor -%} + + +### Usage instructions + +You can point your browser to: *`http://Instance's Internet IP:{{services[0].port}}`* + +The following is the information that may be needed during use + +{% if user is defined -%} +#### Credentials + +By default, the available users are: + +| Username | Password | +| ------- | -------- | +| {{user.username}} | {{user.password}} | + +{% endif -%} + +#### Services and Ports + +| Service | Port | Use | Necessity | +| --- | --- | --- | --- | +{% for service in services -%} +| {{service.name}} | {{service.port}} | {{service.description_en}} | {{service.required}} | +{% endfor -%} + +## Documentation + +[{{trademark}} Administrator Guide](https://support.websoft9.com/docs/{{name}}) + +## Enterprise Support + +If you want to get our Enterprise Support to ensure high availability of applications, you can subscribe our [{{trademark}} Enterprise Support](https://apps.websoft9.com/{{name}}) + +What you get with a Enterprise Support subscription? + +* Knowledge: Answers and guidance from product experts +* Support: Everything you need for technical support, e.g Enable HTTPS, Upgrade guide +* Security: Security services and tools to protect your software \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..6bbf7bc --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,112 @@ +# this file from docker-compose.workspace, delete mail-server +# default MySQL root password is 123456 + + +version: '3.8' +services: + onlyoffice-mysql-server: + container_name: ${APP_CONTAINER_NAME}-mysql + image: mysql:${DB_MYSQL_VERSION} + environment: + - MYSQL_ROOT_PASSWORD=${DB_MYSQL_PASSWORD} + stdin_open: true + user: root + tty: true + restart: always + volumes: + - ${VOLUMES_PATH_PREFIX}/config/mysql/conf.d:/etc/mysql/conf.d + - ${VOLUMES_PATH_PREFIX}/config/mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d + - ${VOLUMES_PATH_PREFIX}/mysql_data:/var/lib/mysql + + onlyoffice-community-server: + container_name: ${APP_CONTAINER_NAME} + image: onlyoffice/communityserver:11.0.0.1458 + depends_on: + - onlyoffice-mysql-server + - onlyoffice-document-server + environment: + - ONLYOFFICE_CORE_MACHINEKEY=core_secret + - CONTROL_PANEL_PORT_80_TCP=80 + - CONTROL_PANEL_PORT_80_TCP_ADDR=onlyoffice-control-panel + - DOCUMENT_SERVER_PORT_80_TCP_ADDR=onlyoffice-document-server + - DOCUMENT_SERVER_JWT_ENABLED=true + - DOCUMENT_SERVER_JWT_SECRET=jwt_secret + - DOCUMENT_SERVER_JWT_HEADER=AuthorizationJwt + - MYSQL_SERVER_ROOT_PASSWORD=123456 + - MYSQL_SERVER_DB_NAME=onlyoffice + - MYSQL_SERVER_HOST=onlyoffice-mysql-server + - MYSQL_SERVER_USER=onlyoffice + - MYSQL_SERVER_PASS=123456 + ports: + - '${APP_PORT}:80' + - '443' + - '5222:5222' + stdin_open: true + tty: true + restart: always + privileged: true + volumes: + - ${VOLUMES_PATH_PREFIX}/community_data:/var/www/onlyoffice/Data + - ${VOLUMES_PATH_PREFIX}/community_log:/var/log/onlyoffice + - ${VOLUMES_PATH_PREFIX}/community_letsencrypt:/etc/letsencrypt + - ${VOLUMES_PATH_PREFIX}/document_data:/var/www/onlyoffice/DocumentServerData + - /sys/fs/cgroup:/sys/fs/cgroup:ro + - ${VOLUMES_PATH_PREFIX}/certs:/var/www/onlyoffice/Data/certs + + onlyoffice-document-server: + container_name: ${APP_CONTAINER_NAME}-document-server + image: onlyoffice/documentserver:6.0.2 + stdin_open: true + tty: true + restart: always + environment: + - JWT_ENABLED=true + - JWT_SECRET=jwt_secret + - JWT_HEADER=AuthorizationJwt + ports: + - '9002:80' + expose: + - '80' + - '443' + volumes: + - ${VOLUMES_PATH_PREFIX}/document_data:/var/www/onlyoffice/Data + - ${VOLUMES_PATH_PREFIX}/document_log:/var/log/onlyoffice + - ${VOLUMES_PATH_PREFIX}/document_fonts:/usr/share/fonts/truetype/custom + - .document_forgotten:/var/lib/onlyoffice/documentserver/App_Data/cache/files/forgotten + + onlyoffice-control-panel: + container_name: ${APP_CONTAINER_NAME}-control-panel + depends_on: + - onlyoffice-document-server + - onlyoffice-community-server + image: onlyoffice/controlpanel:2.9.0.351 + environment: + - ONLYOFFICE_CORE_MACHINEKEY=core_secret + expose: + - '80' + - '443' + restart: always + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - ${VOLUMES_PATH_PREFIX}/controlpanel_data:/var/www/onlyoffice/Data + - ${VOLUMES_PATH_PREFIX}/controlpanel_log:/var/log/onlyoffice + stdin_open: true + tty: true + +networks: + default: + name: ${APP_NETWORK} + +volumes: + document_data: + driver: local + document_log: + driver: local + document_forgotten: + community_mysql: + community_data: + community_log: + community_letsencrypt: + controlpanel_data: + controlpanel_log: + mysql_data: diff --git a/src/filelist b/src/filelist new file mode 100644 index 0000000..341240a --- /dev/null +++ b/src/filelist @@ -0,0 +1,3 @@ +docker-compose.yml +script/test.sh +docker \ No newline at end of file diff --git a/variables.json b/variables.json new file mode 100644 index 0000000..c185667 --- /dev/null +++ b/variables.json @@ -0,0 +1,76 @@ +{ + "name": "template", + "trademark": "ONLYOFFICE", + "installpath": "/data/wwwroot/onlyoffice", + "compose_file": "docker-compose-production.yml", + "env_file": ".env_all", + "requirements":{ + "cpu_arch": "Linux x86-64, ARM 32/64, Windows x86-64, IBM POWER8, x86/i686", + "cpu": "2", + "memory": "4", + "disk": "20", + "swap": "2", + "url": "https://github.com/onlyoffice/docker#recommended-system-requirements" + }, + + "user": { + "username": "admin", + "password": "123456" + }, + + "services":[ + { + "name": "onlyoffice-server", + "port": "9002", + "description_cn": "浏览器访问 ONLYOFFICE", + "description_en": "Web-GUI database management tool", + "required": "Y" + }, + + { + "name": "phpmyadmin", + "port": "9090", + "description_cn": "数据库可视化管理工具", + "description_en": "Web-GUI database management tool", + "required": "Y" + } + ], + + "command_comments":[ + { + "comment_cn": ".env文件的SITE_NAME需要修改成公网IP或者域名才能被外网访问", + "comment_en": ".env file's [SITE_NAME] should be changed to public IP or domain name to be accessed by Internet" + }, + { + "comment_cn": "默认启动的是ERPNext12,如果您想运行ERPNext13,只需将ERPNEXT_VERSION、FRAPPE_VERSION修改成v13", + "comment_en": "The default startup is erpnext12. If you want to run erpnext13, you only need to change ERPNEXT_VERSION/FRAPPE_VERSIO to V13" + } + ], + + "command_extra":[ + { + "cmd": "echo aaa" + }, + { + "cmd": "echo bbb" + } + ], + + "faqs": [ + { + "question_cn": "问题1", + "answer_cn": "答案1", + "question_en": "question1", + "answer_en": "answer1" + }, + + { + "question_cn": "问题2", + "answer_cn": "答案2", + "question_en": "question2", + "answer_en": "answer2" + } + + ] + +}