diff --git a/apps/go/1.21/data.yml b/apps/go/1.21/data.yml new file mode 100644 index 00000000..fcc6ed69 --- /dev/null +++ b/apps/go/1.21/data.yml @@ -0,0 +1 @@ +additionalProperties: \ No newline at end of file diff --git a/apps/go/1.21/docker-compose.yml b/apps/go/1.21/docker-compose.yml new file mode 100644 index 00000000..fdd58ca2 --- /dev/null +++ b/apps/go/1.21/docker-compose.yml @@ -0,0 +1,20 @@ +services: + golang: + image: golang:${GO_VERSION} + container_name: ${CONTAINER_NAME} + working_dir: /app + volumes: + - ${CODE_DIR}:/app + - ./run.sh:/run.sh + - ./.env:/.env + - ./mod:/go/pkg/mod + command: bash /run.sh + networks: + - 1panel-network + ports: + - ${HOST_IP}:${PANEL_APP_PORT_HTTP}:${GO_APP_PORT} + restart: on-failure:5 + +networks: + 1panel-network: + external: true diff --git a/apps/go/1.21/run.sh b/apps/go/1.21/run.sh new file mode 100644 index 00000000..3b136263 --- /dev/null +++ b/apps/go/1.21/run.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +source /.env +$EXEC_SCRIPT + + diff --git a/apps/go/1.22/data.yml b/apps/go/1.22/data.yml new file mode 100644 index 00000000..fcc6ed69 --- /dev/null +++ b/apps/go/1.22/data.yml @@ -0,0 +1 @@ +additionalProperties: \ No newline at end of file diff --git a/apps/go/1.22/docker-compose.yml b/apps/go/1.22/docker-compose.yml new file mode 100644 index 00000000..fdd58ca2 --- /dev/null +++ b/apps/go/1.22/docker-compose.yml @@ -0,0 +1,20 @@ +services: + golang: + image: golang:${GO_VERSION} + container_name: ${CONTAINER_NAME} + working_dir: /app + volumes: + - ${CODE_DIR}:/app + - ./run.sh:/run.sh + - ./.env:/.env + - ./mod:/go/pkg/mod + command: bash /run.sh + networks: + - 1panel-network + ports: + - ${HOST_IP}:${PANEL_APP_PORT_HTTP}:${GO_APP_PORT} + restart: on-failure:5 + +networks: + 1panel-network: + external: true diff --git a/apps/go/1.22/run.sh b/apps/go/1.22/run.sh new file mode 100644 index 00000000..3b136263 --- /dev/null +++ b/apps/go/1.22/run.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +source /.env +$EXEC_SCRIPT + + diff --git a/apps/go/README.md b/apps/go/README.md new file mode 100644 index 00000000..bd93c8be --- /dev/null +++ b/apps/go/README.md @@ -0,0 +1,25 @@ +# Golang + +Golang(也称为 Go)是由谷歌开发的一种静态类型、编译型编程语言,以其简洁、强大和高性能而闻名,特别适合构建高效和可扩展的服务器端应用程序。 + +## 主要功能: + +- **高性能**:Golang 以其高效的编译和执行速度而著称。它生成的可执行文件非常小,并且能够快速启动和执行,使其非常适合构建高性能服务器和微服务。 + +- **简洁和清晰**:Golang 设计的初衷之一就是保持语言的简洁和易读性。它避免了许多复杂的特性,强调代码的清晰和简洁,从而提高开发者的生产力。 + +- **并发性**:Golang 原生支持并发编程,通过 goroutines 和 channels 提供了简单且强大的并发模型,使得构建高并发的应用程序变得更加容易。 + +- **内存管理**:Golang 提供了自动垃圾回收机制,减少了开发者手动管理内存的负担,降低了内存泄漏和其他相关错误的风险。 + +- **标准库**:Golang 拥有丰富且强大的标准库,涵盖了网络编程、文件处理、数据结构等常见需求,极大地简化了开发过程。 + +- **静态类型**:Golang 是一种静态类型的编程语言,编译器在编译时就能捕获大部分错误,增强了代码的可靠性和可维护性。 + +- **跨平台**:Golang 可以在多种操作系统上运行,包括 Windows、Linux 和 macOS,编写一次代码即可在多个平台上编译和执行。 + +- **内置工具**:Golang 提供了丰富的内置工具,如 gofmt 用于格式化代码,godoc 用于生成文档,go test 用于测试代码,极大地提升了开发体验。 + +- **模块化**:Golang 支持模块化编程,通过模块(module)和包(package)管理代码,使得代码组织更加清晰和可维护。 + +- **社区支持**:Golang 拥有一个活跃且庞大的开发者社区,开发者可以轻松找到各种库和工具来扩展其功能,同时也能够获得社区的支持和反馈。 diff --git a/apps/go/data.yml b/apps/go/data.yml new file mode 100644 index 00000000..8f071834 --- /dev/null +++ b/apps/go/data.yml @@ -0,0 +1,18 @@ +name: Go +tags: + - 运行环境 +title: Go 运行环境 +description: Go 运行环境 +additionalProperties: + key: go + name: Go + tags: + - Runtime + shortDescZh: Go 运行环境 + shortDescEn: Go Runtime + type: go + crossVersionUpdate: false + limit: 0 + recommend: 102 + website: https://go.dev/ + github: https://github.com/golang/go diff --git a/apps/go/logo.png b/apps/go/logo.png new file mode 100644 index 00000000..d6d98c3b Binary files /dev/null and b/apps/go/logo.png differ diff --git a/apps/node/12.22.12/docker-compose.yml b/apps/node/12.22.12/docker-compose.yml index 87b874e3..aacac4c8 100644 --- a/apps/node/12.22.12/docker-compose.yml +++ b/apps/node/12.22.12/docker-compose.yml @@ -1,6 +1,6 @@ services: node: - image: node:${NODE_VERSION} + image: 1panel/node:${NODE_VERSION} container_name: ${CONTAINER_NAME} working_dir: /app volumes: @@ -12,7 +12,7 @@ services: - 1panel-network ports: - ${HOST_IP}:${PANEL_APP_PORT_HTTP}:${NODE_APP_PORT} - restart: always + restart: on-failure:5 networks: 1panel-network: external: true diff --git a/apps/node/14.21.3/docker-compose.yml b/apps/node/14.21.3/docker-compose.yml index 87b874e3..aacac4c8 100644 --- a/apps/node/14.21.3/docker-compose.yml +++ b/apps/node/14.21.3/docker-compose.yml @@ -1,6 +1,6 @@ services: node: - image: node:${NODE_VERSION} + image: 1panel/node:${NODE_VERSION} container_name: ${CONTAINER_NAME} working_dir: /app volumes: @@ -12,7 +12,7 @@ services: - 1panel-network ports: - ${HOST_IP}:${PANEL_APP_PORT_HTTP}:${NODE_APP_PORT} - restart: always + restart: on-failure:5 networks: 1panel-network: external: true diff --git a/apps/node/16.20.2/docker-compose.yml b/apps/node/16.20.2/docker-compose.yml index 87b874e3..aacac4c8 100644 --- a/apps/node/16.20.2/docker-compose.yml +++ b/apps/node/16.20.2/docker-compose.yml @@ -1,6 +1,6 @@ services: node: - image: node:${NODE_VERSION} + image: 1panel/node:${NODE_VERSION} container_name: ${CONTAINER_NAME} working_dir: /app volumes: @@ -12,7 +12,7 @@ services: - 1panel-network ports: - ${HOST_IP}:${PANEL_APP_PORT_HTTP}:${NODE_APP_PORT} - restart: always + restart: on-failure:5 networks: 1panel-network: external: true diff --git a/apps/node/18.20.3/docker-compose.yml b/apps/node/18.20.3/docker-compose.yml index 6778d948..aacac4c8 100644 --- a/apps/node/18.20.3/docker-compose.yml +++ b/apps/node/18.20.3/docker-compose.yml @@ -12,7 +12,7 @@ services: - 1panel-network ports: - ${HOST_IP}:${PANEL_APP_PORT_HTTP}:${NODE_APP_PORT} - restart: always + restart: on-failure:5 networks: 1panel-network: external: true diff --git a/apps/node/20.14.0/docker-compose.yml b/apps/node/20.14.0/docker-compose.yml index 6778d948..aacac4c8 100644 --- a/apps/node/20.14.0/docker-compose.yml +++ b/apps/node/20.14.0/docker-compose.yml @@ -12,7 +12,7 @@ services: - 1panel-network ports: - ${HOST_IP}:${PANEL_APP_PORT_HTTP}:${NODE_APP_PORT} - restart: always + restart: on-failure:5 networks: 1panel-network: external: true diff --git a/apps/node/21.7.3/docker-compose.yml b/apps/node/21.7.3/docker-compose.yml index 6778d948..aacac4c8 100644 --- a/apps/node/21.7.3/docker-compose.yml +++ b/apps/node/21.7.3/docker-compose.yml @@ -12,7 +12,7 @@ services: - 1panel-network ports: - ${HOST_IP}:${PANEL_APP_PORT_HTTP}:${NODE_APP_PORT} - restart: always + restart: on-failure:5 networks: 1panel-network: external: true diff --git a/apps/node/22.2.0/docker-compose.yml b/apps/node/22.2.0/docker-compose.yml index 6778d948..aacac4c8 100644 --- a/apps/node/22.2.0/docker-compose.yml +++ b/apps/node/22.2.0/docker-compose.yml @@ -12,7 +12,7 @@ services: - 1panel-network ports: - ${HOST_IP}:${PANEL_APP_PORT_HTTP}:${NODE_APP_PORT} - restart: always + restart: on-failure:5 networks: 1panel-network: external: true