This commit is contained in:
qiaofeng1227 2021-10-11 14:09:13 +08:00
commit b1534a2698
2 changed files with 247 additions and 0 deletions

127
README-zh.md Normal file
View File

@ -0,0 +1,127 @@
# ERPNext on Docker
![](https://libs.websoft9.com/common/websoft9-cloud-installer.png)
## 简介
[简体中文](/README-zh.md) | [English](/README.md)
本项目是由 [Websoft9](https://www.websoft9.com) 研发的 **云原生程序** ,大大简化 ERPNext 复杂的安装及配置。
## 系统要求
安装本项目,确保符合如下的条件([详细参考](https://github.com/frappe/bench)
* **操作系统**: Red Hat, CentOS, Debian, Ubuntu 等主流 Linux等 操作系统
* **公有云**: AWS, Azure, Google Cloud, 阿里云, 腾讯云, 华为云等20多个全球主流云
* **私有云**: KVM, VMware, VirtualBox, OpenStack 等主流虚拟化架构
* **CPU架构**: Linux x86-64, ARM 32/64, Windows x86-64, IBM POWER8, x86/i686
* **内存**: 4GB以上
* **CPU**: 2核以上
* **存储**: 20GB以上
* **Swap分区**: 2GB以上
* **带宽**: 100M以上体验更流畅
## 安装使用
### 自动安装(推荐)
登录 Linux运行下面的**自动化命令**即可启动安装并显示安装结果。
```
sudo wget -N https://raw.githubusercontent.com/Websoft9/StackHub/main/docker-installer.sh; sudo bash docker-installer.sh -r erpnext
```
### package包安装
1.生成package包
登录 Linux运行下面的**自动化命令**即可生成所需的package包。
```
sudo wget -N https://raw.githubusercontent.com/Websoft9/StackHub/main/docker-installer.sh; sudo bash docker-installer.sh -r erpnext -p
```
2.复制package包后安装
将压缩的package包复制到想要安装的服务器或虚拟机登录 Linux运行下面的**自动化命令**即可启动安装并显示安装结果。
```
sudo bash install-erpnext
```
### 手动安装
如果熟悉 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
```
#### 安装 ERPNext
直接运行下面的命令快速安装应用。如果你熟悉 Docker建议先修改 [docker-compose](docker-compose-production.yml) 文件以满足自己的需求
```
git clone --depth=1 https://github.com/Websoft9/docker-erpnext
cd docker-erpnext
public_ip=`wget -O - https://download.websoft9.com/ansible/get_ip.sh | bash`
sudo sed -i s/APP_SITE_URL.*/APP_SITE_URL=$public_ip/g ./.env
sudo docker-compose -f docker-compose.yml --env-file .env up -d
```
### 常见问题
#### 安装 ERPNext 前需要更改密码吗?
是的, 在生产环境中,您应该在 docker-compose 文件中修改所有数据库密码和应用程序密码
#### 端口冲突导致无法启动?
修改 [docker-compose](docker-compose.yml) 文件中冲突的端口,然后再启动容器
#### 为什么ERPNext端口用8000这违反了compose文件的编码规范
因为使用9001或其他端口将会导致部分容器发生错误导致应用无法正常访问
#### 默认启动的ERPNext是v12我想运行其他版本该如何操作
如果您想运行ERPNext13,只需将ERPNEXT_VERSION、FRAPPE_VERSION修改成v13修改前需要删除volumes文件夹
### 使用说明
启动应用后,本地浏览器访问 URL: *`http://服务器公网IP:8000`* 进入应用。
下面是使用过程中可能需要的信息
#### 账号
本应用默认安装后的管理员用户名和密码如下:
| 用户名 | 密码 |
| ------- | -------- |
| Administrator | admin |
#### 服务和端口
| 名称 | 端口号 | 用途 | 必要性 |
| --- | --- | --- | --- |
| erpnext | 8000 | 浏览器访问 ERPNext | Y |
| mariadb | 3306 | TCP 访问MariaDB数据库 | Y |
## 文档
[ERPNext 管理员手册](https://support.websoft9.com/docs/erpnext)
## 企业级支持
如果需要企业级支持,请订阅我们提供的 [ERPNext 企业级支持版](https://apps.websoft9.com/erpnext)
订阅企业级产品后,您可获得:
* 精准知识:产品专家的解答和指导
* 全面支持技术支持所需的一切例如启用HTTPS、升级指南
* 安全顾问:安全服务和工具,可提高您软件的安全性

120
README.md Normal file
View File

@ -0,0 +1,120 @@
# ERPNext 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](https://github.com/frappe/bench):
* **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**: Linux x86-64, ARM 32/64, Windows x86-64, IBM POWER8, x86/i686
* **RAM**: 4 GB or more
* **CPU**: 2 cores or higher
* **HDD**: at least 20 GB of free space
* **Swap file**: at least 2 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 erpnext
```
### 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 erpnext -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-erpnext
```
### 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 ERPNext
We assume that you are already familiar with Docker, and you can modify [docker-compose file](docker-compose.yml) by yourself
```
git clone --depth=1 https://github.com/Websoft9/docker-erpnext
cd docker-erpnext
public_ip=`wget -O - https://download.websoft9.com/ansible/get_ip.sh | bash`
sudo sed -i s/APP_SITE_URL.*/APP_SITE_URL=$public_ip/g ./.env
docker-compose -f docker-compose.yml --env-file .env 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
#### Why does the erptext port use 8000, which violates the encoding specification of the compose file?
The use of 9001 or other ports will lead to errors in some containers and make the application unable to access normally
#### The default startup is erpnext12, What should I do if I want to run another version?
If you want to run erpnext13, you only need to change ERPNEXT_VERSION/FRAPPE_VERSIO to V13;Please delete volumes before edit configure
### Usage instructions
You can point your browser to: *`http://Instance's Internet IP:8000`*
The following is the information that may be needed during use
#### Credentials
By default, the available users are:
| Username | Password |
| ------- | -------- |
| Administrator | admin |
#### Services and Ports
| Service | Port | Use | Necessity |
| --- | --- | --- | --- |
| erpnext | 8000 | Browser access to ERPNext by http | Y |
| mariadb | 3306 | Accessing MySQL database with TCP | Y |
## Documentation
[ERPNext Administrator Guide](https://support.websoft9.com/docs/erpnext)
## Enterprise Support
If you want to get our Enterprise Support to ensure high availability of applications, you can subscribe our [ERPNext Enterprise Support](https://apps.websoft9.com/erpnext)
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