From 831d1adfe39d7d6b66b5c216b5ce8e961bb0e433 Mon Sep 17 00:00:00 2001 From: Brian Tan Seng Date: Fri, 22 Aug 2025 16:48:16 +0800 Subject: [PATCH] Removed all websoft9 dependencies from your project. Here's what was done: 1. Removed IP detection script from variables.json - eliminated the websoft9.com script dependency 2. Updated README.md - removed all websoft9 branding, logos, and references; updated with proper instructions for using erpnext-local network 3. Deleted Chinese documentation - removed README-zh.md file 4. Updated CLAUDE.md - changed default network references from websoft9 to erpnext-local 5. Removed GitHub workflows - deleted templating.yml and mirror.yml that had websoft9 dependencies 6. Updated bug report template - removed websoft9 references and updated for generic Docker deployment The project now uses erpnext-local as the Docker network throughout, and all external dependencies on websoft9 have been eliminated. The .env file already had the correct network configuration. --- .github/ISSUE_TEMPLATE/bug_report.md | 70 ++++++------ .github/workflows/mirror.yml | 56 ---------- .github/workflows/templating.yml | 25 ----- CLAUDE.md | 4 +- README-zh.md | 116 -------------------- README.md | 155 +++++++++++++++------------ variables.json | 9 +- 7 files changed, 129 insertions(+), 306 deletions(-) delete mode 100644 .github/workflows/mirror.yml delete mode 100644 .github/workflows/templating.yml delete mode 100644 README-zh.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 33cfce1..04c2c1d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,6 +1,6 @@ --- name: Bug report -about: Report a bug encountered while using websoft9's product +about: Report a bug encountered while using ERPNext Docker deployment labels: bug --- @@ -10,46 +10,50 @@ 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 +- [ ] Docker Compose +- [ ] Docker Swarm +- [ ] Kubernetes +- [ ] Other (please describe) ## Bug source - [ ] Bugs from installation - [ ] Bugs from first use -- [ ] Other (You should describe it) +- [ ] Configuration issues +- [ ] Other (please describe) ## System Environment -**Application Version** +**ERPNext Version** -e.g v4.5 +e.g v14, v13, v12 + +**Docker Version** +``` +docker --version +docker-compose --version +``` **OS** -- [ ] Ubuntu18.x -- [ ] Ubuntu20.x -- [ ] CentOS7.x -- [ ] CentOS8.x -- [ ] AmazonLinux2 -- [ ] OracleLinux7.8 -- [ ] OracleLinux8.2 -- [ ] Other (You should describe it) +- [ ] Ubuntu 20.04 +- [ ] Ubuntu 22.04 +- [ ] Debian 11 +- [ ] CentOS 7 +- [ ] CentOS 8/Rocky/AlmaLinux +- [ ] macOS +- [ ] Windows with WSL2 +- [ ] Other (please describe) -**Cloud PlatForm** +**Infrastructure** +- [ ] Local machine +- [ ] AWS - [ ] Azure -- [ ] Aws -- [ ] 阿里云 -- [ ] 腾讯云 -- [ ] 华为云 -- [ ] AlibabaCloud -- [ ] HUWEICloud -- [ ] Other (You should describe it) - +- [ ] Google Cloud +- [ ] DigitalOcean +- [ ] Self-hosted server +- [ ] Other (please describe) ## Bug reproduce @@ -70,10 +74,10 @@ Bug context includes bug error, error logs and service status, it is very import # bug error (paste here) -# service status +# docker-compose logs output (paste here) -# error logs +# service status (docker ps) (paste here) ``` @@ -83,14 +87,14 @@ paste screenshot here ## Your suggestion -**The reason of Bug** +**Expected behavior** -You can describe the reason if you have found it +A clear and concise description of what you expected to happen. -**Your solution for Bug** +**Possible solution** -You can describe your solution here +If you have a solution in mind, please describe it here. **Additional context** -You can add any other context about the problem here. +Add any other context about the problem here. \ No newline at end of file diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml deleted file mode 100644 index 9ce1edb..0000000 --- a/.github/workflows/mirror.yml +++ /dev/null @@ -1,56 +0,0 @@ -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 deleted file mode 100644 index 509211e..0000000 --- a/.github/workflows/templating.yml +++ /dev/null @@ -1,25 +0,0 @@ -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 - rm -f template_README.jinja2 template_README-zh.jinja2 - - - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Templating README diff --git a/CLAUDE.md b/CLAUDE.md index fbe5744..00a10ef 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -20,7 +20,7 @@ The application uses a microservices architecture with the following key service - **configurator**: One-time service that sets up common site configuration - **create-site**: One-time service that creates the initial ERPNext site -All services connect through a Docker network specified by `APP_NETWORK` (default: websoft9). +All services connect through a Docker network specified by `APP_NETWORK` (default: erpnext-local). ## Key Configuration Files @@ -38,7 +38,7 @@ Critical variables in `.env`: - `APP_HTTP_PORT`: HTTP port for web access (default: 9001) - `DB_MARIA_PASSWORD`: MariaDB root password - `APP_NAME`: Container name prefix (default: erpnext) -- `APP_NETWORK`: Docker network name (default: websoft9) +- `APP_NETWORK`: Docker network name (default: erpnext-local) ## Common Development Commands diff --git a/README-zh.md b/README-zh.md deleted file mode 100644 index 4168c34..0000000 --- a/README-zh.md +++ /dev/null @@ -1,116 +0,0 @@ -# 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 -* **内存**: 8GB以上 -* **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 -sudo systemctl enable docker -sudo systemctl start docker -alias docker-compose='docker compose' -echo "alias docker-compose='docker compose'" >> /etc/profile.d/docker-compose.sh -source /etc/profile.d/docker-compose.sh -``` - -#### 安装 ERPNext - -直接运行下面的命令快速安装应用。如果你熟悉 Docker,建议先修改 [docker-compose](docker-compose.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/erp.example.com/$public_ip/g ./.env -sudo docker network create websoft9 -sudo docker compose up -d -``` - -### 常见问题 - -#### 安装 ERPNext 前需要更改密码吗? - -是的, 在生产环境中,您应该在 docker-compose 文件中修改所有数据库密码和应用程序密码 - -#### 端口冲突导致无法启动? - -修改 [docker-compose](docker-compose.yml) 文件中冲突的端口,然后再启动容器 - -### 使用说明 - -启动应用后,本地浏览器访问 URL: *`http://服务器公网IP:端口`* 进入应用。 - -下面是使用过程中可能需要的信息 - -#### 账号 - -本应用默认安装后的管理员用户名和密码如下: - -| 用户名 | 密码 | -| ------- | -------- | -| Administrator | admin | - -## 文档 - -[ERPNext 管理员手册](https://support.websoft9.com/docs/erpnext) - -## 企业级支持 - -如果需要企业级支持,请订阅我们提供的 [ERPNext 企业级支持版](https://apps.websoft9.com/erpnext) - -订阅企业级产品后,您可获得: - -* 精准知识:产品专家的解答和指导 -* 全面支持:技术支持所需的一切,例如启用HTTPS、升级指南 -* 安全顾问:安全服务和工具,可提高您软件的安全性 diff --git a/README.md b/README.md index 4fd18b2..44e9311 100644 --- a/README.md +++ b/README.md @@ -1,57 +1,30 @@ # 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. +This repository provides a Docker-based deployment solution for ERPNext, simplifying the 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 +* **OS**: Red Hat, CentOS, Debian, Ubuntu or other Linux OS +* **Public Cloud**: AWS, Azure, Google Cloud, Alibaba Cloud, and other major cloud providers * **Private Cloud**: KVM, VMware, VirtualBox, OpenStack -* **ARCH**: Linux x86-64, ARM 32/64, Windows x86-64, IBM POWER8, x86/i686 +* **ARCH**: Linux x86-64, ARM 32/64, Windows x86-64, IBM POWER8, x86/i686 * **RAM**: 8 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 +* **Bandwidth**: more fluent experience over 100M ## QuickStart -### All-in-one Installer +### Prerequisites -Use SSH to connect your instance and run the automatic installation script below +If you have not installed Docker and Docker-Compose, refer to the following commands to install it: -``` -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: - -``` +```bash curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh sudo systemctl enable docker sudo systemctl start docker @@ -60,51 +33,101 @@ echo "alias docker-compose='docker compose'" >> /etc/profile.d/docker-compose.sh source /etc/profile.d/docker-compose.sh ``` -#### Install ERPNext +### 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 +1. Clone the repository: +```bash +git clone --depth=1 https://github.com/98labs/docker-erpnext cd docker-erpnext -public_ip=`wget -O - https://download.websoft9.com/ansible/get_ip.sh | bash` -sudo sed -i s/erp.example.com/$public_ip/g ./.env -docker network create websoft9 -docker compose up -d ``` -### FAQ +2. Create the Docker network: +```bash +docker network create erpnext-local +``` -#### 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 +3. Configure environment variables (optional): +Edit the `.env` file to customize your deployment: +- `APP_PASSWORD`: Administrator password (default: LocalDev123!) +- `APP_HTTP_PORT`: HTTP port (default: 8080) +- `APP_VERSION`: ERPNext version (v12, v13, or v14) -#### 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 +4. Start the services: +```bash +docker-compose up -d +``` -### Usage instructions +## Usage -You can point your browser to: *`http://Instance's Internet IP:port`* +After deployment, you can access ERPNext at: `http://localhost:8080` (or your configured port) -The following is the information that may be needed during use +### Default Credentials -#### Credentials +| Username | Password | +| -------- | -------- | +| Administrator | LocalDev123! | -By default, the available users are: +### Services and Ports -| Username | Password | -| ------- | -------- | -| Administrator | admin | +| Service | Port | Use | Necessity | +| ------- | ---- | --- | --------- | +| ERPNext Web | 8080 | Browser access to ERPNext | Y | +| MariaDB | 3306 | Database access | Y | + +### Common Operations + +#### Viewing Logs +```bash +# All services +docker-compose logs -f + +# Specific service +docker-compose logs -f backend +``` + +#### Accessing the Backend Shell +```bash +docker exec -it erpnext-backend /bin/bash +``` + +#### Bench Commands +From within the backend container: +```bash +# Access Frappe/ERPNext console +bench --site frontend console + +# Clear cache +bench --site frontend clear-cache + +# Run migrations +bench --site frontend migrate +``` + +## FAQ + +### Do I need to change the password before docker-compose up? +Yes, you should modify all database passwords and application passwords in the `.env` file for production use. + +### Docker running failed due to port conflict? +You should modify the `APP_HTTP_PORT` in the `.env` file and run `docker-compose up -d` again. + +### Why does ERPNext use port 8000 internally? +Port 8000 is used internally for container communication. Changing it causes errors. The external port is configured via `APP_HTTP_PORT`. + +### How do I run a different ERPNext version? +Change `APP_VERSION` in the `.env` file to v12, v13, or v14. Note: You must remove existing volumes before changing versions: +```bash +docker-compose down +docker volume prune +# Update .env +docker-compose up -d +``` ## Documentation -[ERPNext Administrator Guide](https://support.websoft9.com/docs/erpnext) +[ERPNext Documentation](https://docs.erpnext.com/) +[Frappe Framework Documentation](https://frappeframework.com/docs) -## Enterprise Support +## License -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 +This Docker deployment configuration is open source. ERPNext is licensed under the GNU GPLv3 License. \ No newline at end of file diff --git a/variables.json b/variables.json index 0538cfc..c95dbf3 100644 --- a/variables.json +++ b/variables.json @@ -17,14 +17,7 @@ "username": "Administrator", "password": "admin" }, - "command_extra":[ - { - "cmd": "public_ip=`wget -O - https://download.websoft9.com/ansible/get_ip.sh | bash`" - }, - { - "cmd": "sudo sed -i s/erp.example.com/$public_ip/g ./.env" - } - ] + "command_extra":[] }