Merge pull request 'Replace all global variables with right value' (#60) from lunny/fix_global_variables into main

Reviewed-on: https://gitea.com/gitea/docs/pulls/60
This commit is contained in:
Lunny Xiao
2024-09-01 06:47:31 +00:00
41 changed files with 276 additions and 198 deletions

View File

@@ -23,7 +23,7 @@ In order to get file rendering through external binaries, their associated packa
If you're using a Docker image, your `Dockerfile` should contain something along this lines:
```docker
FROM gitea/gitea:@version@
FROM gitea/gitea:@dockerVersion@
[...]
COPY custom/app.ini /data/gitea/conf/app.ini

View File

@@ -45,7 +45,7 @@ To work with tagged releases, the following commands can be used:
```bash
git branch -a
git checkout v@version@
git checkout @sourceBranch@
```
To validate a Pull Request, first enable the new branch (`xyz` is the PR id;
@@ -55,14 +55,14 @@ for example `2663` for [#2663](https://github.com/go-gitea/gitea/pull/2663)):
git fetch origin pull/xyz/head:pr-xyz
```
To build Gitea from source at a specific tagged release (like v@version@), list the
To build Gitea from source at a specific tagged release (like @sourceVersion@), list the
available tags and check out the specific tag.
List available tags with the following.
```bash
git tag -l
git checkout v@version@ # or git checkout pr-xyz
git checkout @sourceVersion@ # or git checkout pr-xyz
```
## Build

View File

@@ -38,7 +38,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -58,7 +58,7 @@ sudo chown 1000:1000 config/ data/
> If you don't give the volume correct permissions, the container may not start.
For a stable release you could use `:latest-rootless`, `:1-rootless` or specify a certain release like `:@version@-rootless`, but if you'd like to use the latest development version then `:nightly-rootless` would be an appropriate tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly-rootless` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly-rootless`)
For a stable release you could use `:latest-rootless`, `:1-rootless` or specify a certain release like `:@dockerVersion@-rootless`, but if you'd like to use the latest development version then `:nightly-rootless` would be an appropriate tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly-rootless` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly-rootless`)
## Custom port
@@ -71,7 +71,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -95,7 +95,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
+ environment:
+ - GITEA__database__DB_TYPE=mysql
+ - GITEA__database__HOST=db:3306
@@ -136,7 +136,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
environment:
+ - GITEA__database__DB_TYPE=postgres
+ - GITEA__database__HOST=db:5432
@@ -184,7 +184,7 @@ version: "2"
+
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- - ./data:/var/lib/gitea
@@ -211,7 +211,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
+ user: 1001
volumes:
@@ -283,7 +283,7 @@ docker-compose up -d
- Rename folder (inside volume) gitea to custom
- Edit app.ini if needed
- Set START_SSH_SERVER = true
- Use image gitea/gitea:@version@-rootless
- Use image gitea/gitea:@dockerVersion@-rootless
## Managing Deployments With Environment Variables

View File

@@ -23,7 +23,7 @@ image as a service. Since there is no database available, one can be initialized
Create a directory like `gitea` and paste the following content into a file named `docker-compose.yml`.
Note that the volume should be owned by the user/group with the UID/GID specified in the config file.
If you don't give the volume correct permissions, the container may not start.
For a stable release you can use `:latest`, `:1` or specify a certain release like `:@version@`, but if you'd like to use the latest development version of Gitea then you could use the `:nightly` tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly`)
For a stable release you can use `:latest`, `:1` or specify a certain release like `:@dockerVersion@`, but if you'd like to use the latest development version of Gitea then you could use the `:nightly` tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly`)
```yaml
version: "3"
@@ -34,7 +34,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -66,7 +66,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -101,7 +101,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -152,7 +152,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -208,7 +208,7 @@ networks:
+
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
restart: always
networks:

View File

@@ -61,6 +61,78 @@ const pageConfig = renderApiSSR ? {
],
}: {}
const globalVariables = {
current: {
'goVersion': '1.22',
'minGoVersion': '1.22',
'minNodeVersion': '18',
'version': 'main-nightly',
'sourceVersion': 'main',
'sourceBranch': 'main',
'dockerVersion': 'nightly',
'displayVersion': '1.23-dev'
},
'1.22': {
'goVersion': '1.22',
'minGoVersion': '1.22',
'minNodeVersion': '18',
'version': '1.22.1',
'sourceVersion': 'v1.22.1',
'sourceBranch': 'release/v1.22',
'dockerVersion': '1.22.1',
'displayVersion': '1.22.1'
},
'1.21': {
'goVersion': '1.21',
'minGoVersion': '1.21',
'minNodeVersion': '18',
'version': '1.21.11',
'sourceVersion': 'v1.21.11',
'sourceBranch': 'release/v1.21',
'dockerVersion': '1.21.11',
'displayVersion': '1.21.11'
},
'1.20': {
'goVersion': '1.20',
'minGoVersion': '1.20',
'minNodeVersion': '16',
'version': '1.20.6',
'sourceVersion': 'v1.20.6',
'sourceBranch': 'release/v1.20',
'dockerVersion': '1.20.6',
'displayVersion': '1.20.6'
},
'1.19': {
'goVersion': '1.20',
'minGoVersion': '1.19',
'minNodeVersion': '14',
'version': '1.19.4',
'sourceVersion': 'v1.19.4',
'sourceBranch': 'release/v1.19',
'dockerVersion': '1.19.4',
'displayVersion': '1.19.4'
}
}
const versions = {
current: {
label: globalVariables['current'].displayVersion, // path is kept as next for dev (so users can always find "nightly" docs)
banner: 'unreleased',
},
'1.22': {
label: globalVariables['1.22'].displayVersion,
},
'1.21': {
label: globalVariables['1.21'].displayVersion,
},
'1.20': {
label: globalVariables['1.20'].displayVersion,
},
'1.19': {
label: globalVariables['1.19'].displayVersion,
}
}
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Gitea Documentation',
@@ -112,24 +184,7 @@ const config = {
}
return `https://gitea.com/gitea/docs/src/branch/main/i18n/${locale}/docusaurus-plugin-content-docs/${version === 'current' ? 'current': `version-${version}`}/${docPath}`;
},
versions: {
current: {
label: '1.23-dev', // path is kept as next for dev (so users can always find "nightly" docs)
banner: 'unreleased',
},
'1.22': {
label: '1.22.1',
},
'1.21': {
label: '1.21.11',
},
'1.20': {
label: '1.20.6'
},
'1.19': {
label: '1.19.4',
}
},
versions: versions,
lastVersion: '1.22',
async sidebarItemsGenerator({defaultSidebarItemsGenerator, ...args}) {
const {item} = args;
@@ -154,6 +209,29 @@ const config = {
],
apiConfig,
],
markdown: {
preprocessor: ({filePath, fileContent}) => {
var key = '';
var found = false;
for (key in globalVariables) {
let folderName = (key == 'current' ? 'current' : `version-${key}`);
if (filePath.includes(`/${folderName}/`)) {
found = true;
break;
}
}
if (key == '' || !found) {
key = 'current';
}
let content = fileContent;
for (const variable in globalVariables[key]) {
content = content.replaceAll('@'+variable+'@', globalVariables[key][variable]);
}
return content
},
},
themes: [
[
"@easyops-cn/docusaurus-search-local",

View File

@@ -24,7 +24,7 @@ Gitea 通过外部二进制文件支持自定义文件渲染(例如 Jupyter no
如果您正在使用 Docker 镜像,则您的 `Dockerfile` 应该包含以下内容:
```docker
FROM gitea/gitea:@version@
FROM gitea/gitea:@dockerVersion@
[...]
COPY custom/app.ini /data/gitea/conf/app.ini

View File

@@ -30,7 +30,7 @@ git clone https://github.com/go-gitea/gitea
```bash
git branch -a
git checkout v@version@
git checkout @sourceBranch@
```
要验证一个拉取请求Pull Request, PR要先启用新的分支其中 `xyz` 是 PR 的 ID例如对于 [#2663](https://github.com/go-gitea/gitea/pull/2663)ID是 `2663 `
@@ -39,12 +39,12 @@ git checkout v@version@
git fetch origin pull/xyz/head:pr-xyz
```
要以指定发行版本(如 v@version@ )的源代码来构建 Gitea可执行以下命令列出可用的版本并选择某个版本签出。
要以指定发行版本(如 @sourceVersion@ )的源代码来构建 Gitea可执行以下命令列出可用的版本并选择某个版本签出。
使用以下命令列出可用的版本:
```bash
git tag -l
git checkout v@version@ # or git checkout pr-xyz
git checkout @sourceVersion@ # or git checkout pr-xyz
```
## 构建

View File

@@ -33,7 +33,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -53,7 +53,7 @@ sudo chown 1000:1000 config/ data/
> 如果未为卷设置正确的权限,容器可能无法启动。
对于稳定版本,您可以使用 `:latest-rootless``:1-rootless`,或指定特定的版本,如: `@version@-rootless`。如果您想使用最新的开发版本,则可以使用 `:dev-rootless` 标签。如果您想运行发布分支的最新提交,可以使用 `:1.x-dev-rootless` 标签,其中 x是 Gitea 的次要版本号(例如:`1.16-dev-rootless`)。
对于稳定版本,您可以使用 `:latest-rootless``:1-rootless`,或指定特定的版本,如: `@dockerVersion@-rootless`。如果您想使用最新的开发版本,则可以使用 `:dev-rootless` 标签。如果您想运行发布分支的最新提交,可以使用 `:1.x-dev-rootless` 标签,其中 x是 Gitea 的次要版本号(例如:`1.16-dev-rootless`)。
## 自定义端口
@@ -64,7 +64,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -87,7 +87,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
+ environment:
+ - GITEA__database__DB_TYPE=mysql
+ - GITEA__database__HOST=db:3306
@@ -127,7 +127,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
environment:
+ - GITEA__database__DB_TYPE=postgres
+ - GITEA__database__HOST=db:5432
@@ -172,7 +172,7 @@ version: "2"
+
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- - ./data:/var/lib/gitea
@@ -199,7 +199,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
+ user: 1001
volumes:
@@ -252,7 +252,7 @@ docker-compose up -d
- 将卷中的文件夹gitea重命名为 custom
- 如果需要,编辑 `app.ini`
- 设置 `START_SSH_SERVER = true`
- 使用镜像 `gitea/gitea:@version@-rootless`
- 使用镜像 `gitea/gitea:@dockerVersion@-rootless`
## 使用环境变量管理部署

View File

@@ -14,7 +14,7 @@ Gitea 在其 Docker Hub 组织内提供自动更新的 Docker 镜像。可以始
## 基本
最简单的设置只是创建一个卷和一个网络,然后将 `gitea/gitea:latest` 镜像作为服务启动。由于没有可用的数据库,因此可以使用 SQLite3 初始化数据库。创建一个类似 `gitea` 的目录,并将以下内容粘贴到名为 `docker-compose.yml` 的文件中。请注意,该卷应由配置文件中指定的 UID/GID 的用户/组拥有。如果您不授予卷正确的权限,则容器可能无法启动。另请注意,标签 `:latest` 将安装当前的开发版本。对于稳定的发行版,您可以使用 `:1` 或指定某个发行版,例如 `@version@`
最简单的设置只是创建一个卷和一个网络,然后将 `gitea/gitea:latest` 镜像作为服务启动。由于没有可用的数据库,因此可以使用 SQLite3 初始化数据库。创建一个类似 `gitea` 的目录,并将以下内容粘贴到名为 `docker-compose.yml` 的文件中。请注意,该卷应由配置文件中指定的 UID/GID 的用户/组拥有。如果您不授予卷正确的权限,则容器可能无法启动。另请注意,标签 `:latest` 将安装当前的开发版本。对于稳定的发行版,您可以使用 `:1` 或指定某个发行版,例如 `@dockerVersion@`
```yaml
version: "3"
@@ -25,7 +25,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -55,7 +55,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -89,7 +89,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -139,7 +139,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -192,7 +192,7 @@ networks:
+
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
restart: always
networks:

View File

@@ -22,7 +22,7 @@ Gitea 通过外部二进制文件支持自定义文件渲染(例如 Jupyter no
如果您正在使用 Docker 镜像,则您的 `Dockerfile` 应该包含以下内容:
```docker
FROM gitea/gitea:@version@
FROM gitea/gitea:@dockerVersion@
[...]
COPY custom/app.ini /data/gitea/conf/app.ini

View File

@@ -25,14 +25,14 @@ cd gitea
```bash
git branch -a
git checkout v@version@
git checkout @sourceBranch@
```
最后,你也可以直接使用标签版本如 `v@version@`。你可以执行以下命令列出可用的版本并选择某个版本签出:
最后,你也可以直接使用标签版本如 `@sourceVersion@`。你可以执行以下命令列出可用的版本并选择某个版本签出:
```bash
git tag -l
git checkout v@version@
git checkout @sourceVersion@
```
## 编译

View File

@@ -33,7 +33,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -53,7 +53,7 @@ sudo chown 1000:1000 config/ data/
> 如果未为卷设置正确的权限,容器可能无法启动。
对于稳定版本,您可以使用 `:latest-rootless``:1-rootless`,或指定特定的版本,如: `@version@-rootless`。如果您想使用最新的开发版本,则可以使用 `:dev-rootless` 标签。如果您想运行发布分支的最新提交,可以使用 `:1.x-dev-rootless` 标签,其中 x是 Gitea 的次要版本号(例如:`1.16-dev-rootless`)。
对于稳定版本,您可以使用 `:latest-rootless``:1-rootless`,或指定特定的版本,如: `@dockerVersion@-rootless`。如果您想使用最新的开发版本,则可以使用 `:dev-rootless` 标签。如果您想运行发布分支的最新提交,可以使用 `:1.x-dev-rootless` 标签,其中 x是 Gitea 的次要版本号(例如:`1.16-dev-rootless`)。
## 自定义端口
@@ -64,7 +64,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -87,7 +87,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
+ environment:
+ - GITEA__database__DB_TYPE=mysql
+ - GITEA__database__HOST=db:3306
@@ -127,7 +127,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
environment:
+ - GITEA__database__DB_TYPE=postgres
+ - GITEA__database__HOST=db:5432
@@ -172,7 +172,7 @@ version: "2"
+
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- - ./data:/var/lib/gitea
@@ -199,7 +199,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
+ user: 1001
volumes:
@@ -252,7 +252,7 @@ docker-compose up -d
- 将卷中的文件夹gitea重命名为 custom
- 如果需要,编辑 `app.ini`
- 设置 `START_SSH_SERVER = true`
- 使用镜像 `gitea/gitea:@version@-rootless`
- 使用镜像 `gitea/gitea:@dockerVersion@-rootless`
## 使用环境变量管理部署

View File

@@ -12,7 +12,7 @@ Gitea 在其 Docker Hub 组织内提供自动更新的 Docker 镜像。可以始
## 基本
最简单的设置只是创建一个卷和一个网络,然后将 `gitea/gitea:latest` 镜像作为服务启动。由于没有可用的数据库,因此可以使用 SQLite3 初始化数据库。创建一个类似 `gitea` 的目录,并将以下内容粘贴到名为 `docker-compose.yml` 的文件中。请注意,该卷应由配置文件中指定的 UID/GID 的用户/组拥有。如果您不授予卷正确的权限,则容器可能无法启动。另请注意,标签 `:latest` 将安装当前的开发版本。对于稳定的发行版,您可以使用 `:1` 或指定某个发行版,例如 `@version@`
最简单的设置只是创建一个卷和一个网络,然后将 `gitea/gitea:latest` 镜像作为服务启动。由于没有可用的数据库,因此可以使用 SQLite3 初始化数据库。创建一个类似 `gitea` 的目录,并将以下内容粘贴到名为 `docker-compose.yml` 的文件中。请注意,该卷应由配置文件中指定的 UID/GID 的用户/组拥有。如果您不授予卷正确的权限,则容器可能无法启动。另请注意,标签 `:latest` 将安装当前的开发版本。对于稳定的发行版,您可以使用 `:1` 或指定某个发行版,例如 `@dockerVersion@`
```yaml
version: "3"
@@ -23,7 +23,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -53,7 +53,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -87,7 +87,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -137,7 +137,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -190,7 +190,7 @@ networks:
+
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
restart: always
networks:

View File

@@ -22,7 +22,7 @@ Gitea 通过外部二进制文件支持自定义文件渲染(例如 Jupyter no
如果您正在使用 Docker 镜像,则您的 `Dockerfile` 应该包含以下内容:
```docker
FROM gitea/gitea:@version@
FROM gitea/gitea:@dockerVersion@
[...]
COPY custom/app.ini /data/gitea/conf/app.ini

View File

@@ -30,14 +30,14 @@ cd gitea
```bash
git branch -a
git checkout v@version@
git checkout @sourceBranch@
```
最后,你也可以直接使用标签版本如 `v@version@`。你可以执行以下命令列出可用的版本并选择某个版本签出:
最后,你也可以直接使用标签版本如 `@sourceVersion@`。你可以执行以下命令列出可用的版本并选择某个版本签出:
```bash
git tag -l
git checkout v@version@
git checkout @sourceVersion@
```
## 编译

View File

@@ -33,7 +33,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -53,7 +53,7 @@ sudo chown 1000:1000 config/ data/
> 如果未为卷设置正确的权限,容器可能无法启动。
对于稳定版本,您可以使用 `:latest-rootless``:1-rootless`,或指定特定的版本,如: `@version@-rootless`。如果您想使用最新的开发版本,则可以使用 `:dev-rootless` 标签。如果您想运行发布分支的最新提交,可以使用 `:1.x-dev-rootless` 标签,其中 x是 Gitea 的次要版本号(例如:`1.16-dev-rootless`)。
对于稳定版本,您可以使用 `:latest-rootless``:1-rootless`,或指定特定的版本,如: `@dockerVersion@-rootless`。如果您想使用最新的开发版本,则可以使用 `:dev-rootless` 标签。如果您想运行发布分支的最新提交,可以使用 `:1.x-dev-rootless` 标签,其中 x是 Gitea 的次要版本号(例如:`1.16-dev-rootless`)。
## 自定义端口
@@ -64,7 +64,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -87,7 +87,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
+ environment:
+ - GITEA__database__DB_TYPE=mysql
+ - GITEA__database__HOST=db:3306
@@ -127,7 +127,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
environment:
+ - GITEA__database__DB_TYPE=postgres
+ - GITEA__database__HOST=db:5432
@@ -172,7 +172,7 @@ version: "2"
+
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- - ./data:/var/lib/gitea
@@ -199,7 +199,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
+ user: 1001
volumes:
@@ -252,7 +252,7 @@ docker-compose up -d
- 将卷中的文件夹gitea重命名为 custom
- 如果需要,编辑 `app.ini`
- 设置 `START_SSH_SERVER = true`
- 使用镜像 `gitea/gitea:@version@-rootless`
- 使用镜像 `gitea/gitea:@dockerVersion@-rootless`
## 使用环境变量管理部署

View File

@@ -17,7 +17,7 @@ Gitea 在其 Docker Hub 组织内提供自动更新的 Docker 镜像。可以始
## 基本
最简单的设置只是创建一个卷和一个网络,然后将 `gitea/gitea:latest` 镜像作为服务启动。由于没有可用的数据库,因此可以使用 SQLite3 初始化数据库。创建一个类似 `gitea` 的目录,并将以下内容粘贴到名为 `docker-compose.yml` 的文件中。请注意,该卷应由配置文件中指定的 UID/GID 的用户/组拥有。如果您不授予卷正确的权限,则容器可能无法启动。另请注意,标签 `:latest` 将安装当前的开发版本。对于稳定的发行版,您可以使用 `:1` 或指定某个发行版,例如 `@version@`
最简单的设置只是创建一个卷和一个网络,然后将 `gitea/gitea:latest` 镜像作为服务启动。由于没有可用的数据库,因此可以使用 SQLite3 初始化数据库。创建一个类似 `gitea` 的目录,并将以下内容粘贴到名为 `docker-compose.yml` 的文件中。请注意,该卷应由配置文件中指定的 UID/GID 的用户/组拥有。如果您不授予卷正确的权限,则容器可能无法启动。另请注意,标签 `:latest` 将安装当前的开发版本。对于稳定的发行版,您可以使用 `:1` 或指定某个发行版,例如 `@dockerVersion@`
```yaml
version: "3"
@@ -28,7 +28,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -58,7 +58,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -92,7 +92,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -142,7 +142,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -195,7 +195,7 @@ networks:
+
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
restart: always
networks:

View File

@@ -22,7 +22,7 @@ Gitea 通过外部二进制文件支持自定义文件渲染(例如 Jupyter no
如果您正在使用 Docker 镜像,则您的 `Dockerfile` 应该包含以下内容:
```docker
FROM gitea/gitea:@version@
FROM gitea/gitea:@dockerVersion@
[...]
COPY custom/app.ini /data/gitea/conf/app.ini

View File

@@ -33,7 +33,7 @@ git clone https://github.com/go-gitea/gitea
```bash
git branch -a
git checkout v@version@
git checkout @sourceBranch@
```
要验证一个拉取请求Pull Request, PR要先启用新的分支其中 `xyz` 是 PR 的 ID例如对于 [#2663](https://github.com/go-gitea/gitea/pull/2663)ID是 `2663 `
@@ -42,12 +42,12 @@ git checkout v@version@
git fetch origin pull/xyz/head:pr-xyz
```
要以指定发行版本(如 v@version@ )的源代码来构建 Gitea可执行以下命令列出可用的版本并选择某个版本签出。
要以指定发行版本(如 @sourceVersion@ )的源代码来构建 Gitea可执行以下命令列出可用的版本并选择某个版本签出。
使用以下命令列出可用的版本:
```bash
git tag -l
git checkout v@version@ # or git checkout pr-xyz
git checkout @sourceVersion@ # or git checkout pr-xyz
```
## 构建

View File

@@ -33,7 +33,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -53,7 +53,7 @@ sudo chown 1000:1000 config/ data/
> 如果未为卷设置正确的权限,容器可能无法启动。
对于稳定版本,您可以使用 `:latest-rootless``:1-rootless`,或指定特定的版本,如: `@version@-rootless`。如果您想使用最新的开发版本,则可以使用 `:dev-rootless` 标签。如果您想运行发布分支的最新提交,可以使用 `:1.x-dev-rootless` 标签,其中 x是 Gitea 的次要版本号(例如:`1.16-dev-rootless`)。
对于稳定版本,您可以使用 `:latest-rootless``:1-rootless`,或指定特定的版本,如: `@dockerVersion@-rootless`。如果您想使用最新的开发版本,则可以使用 `:dev-rootless` 标签。如果您想运行发布分支的最新提交,可以使用 `:1.x-dev-rootless` 标签,其中 x是 Gitea 的次要版本号(例如:`1.16-dev-rootless`)。
## 自定义端口
@@ -64,7 +64,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -87,7 +87,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
+ environment:
+ - GITEA__database__DB_TYPE=mysql
+ - GITEA__database__HOST=db:3306
@@ -127,7 +127,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
environment:
+ - GITEA__database__DB_TYPE=postgres
+ - GITEA__database__HOST=db:5432
@@ -172,7 +172,7 @@ version: "2"
+
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- - ./data:/var/lib/gitea
@@ -199,7 +199,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
+ user: 1001
volumes:
@@ -252,7 +252,7 @@ docker-compose up -d
- 将卷中的文件夹gitea重命名为 custom
- 如果需要,编辑 `app.ini`
- 设置 `START_SSH_SERVER = true`
- 使用镜像 `gitea/gitea:@version@-rootless`
- 使用镜像 `gitea/gitea:@dockerVersion@-rootless`
## 使用环境变量管理部署

View File

@@ -17,7 +17,7 @@ Gitea 在其 Docker Hub 组织内提供自动更新的 Docker 镜像。可以始
## 基本
最简单的设置只是创建一个卷和一个网络,然后将 `gitea/gitea:latest` 镜像作为服务启动。由于没有可用的数据库,因此可以使用 SQLite3 初始化数据库。创建一个类似 `gitea` 的目录,并将以下内容粘贴到名为 `docker-compose.yml` 的文件中。请注意,该卷应由配置文件中指定的 UID/GID 的用户/组拥有。如果您不授予卷正确的权限,则容器可能无法启动。另请注意,标签 `:latest` 将安装当前的开发版本。对于稳定的发行版,您可以使用 `:1` 或指定某个发行版,例如 `@version@`
最简单的设置只是创建一个卷和一个网络,然后将 `gitea/gitea:latest` 镜像作为服务启动。由于没有可用的数据库,因此可以使用 SQLite3 初始化数据库。创建一个类似 `gitea` 的目录,并将以下内容粘贴到名为 `docker-compose.yml` 的文件中。请注意,该卷应由配置文件中指定的 UID/GID 的用户/组拥有。如果您不授予卷正确的权限,则容器可能无法启动。另请注意,标签 `:latest` 将安装当前的开发版本。对于稳定的发行版,您可以使用 `:1` 或指定某个发行版,例如 `@dockerVersion@`
```yaml
version: "3"
@@ -28,7 +28,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -58,7 +58,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -92,7 +92,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -142,7 +142,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -195,7 +195,7 @@ networks:
+
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
restart: always
networks:

View File

@@ -25,7 +25,7 @@ Gitea 通过外部二进制文件支持自定义文件渲染(例如 Jupyter no
如果您正在使用 Docker 镜像,则您的 `Dockerfile` 应该包含以下内容:
```docker
FROM gitea/gitea:@version@
FROM gitea/gitea:@dockerVersion@
[...]
COPY custom/app.ini /data/gitea/conf/app.ini

View File

@@ -33,7 +33,7 @@ git clone https://github.com/go-gitea/gitea
```bash
git branch -a
git checkout v@version@
git checkout @sourceBranch@
```
要验证一个拉取请求Pull Request, PR要先启用新的分支其中 `xyz` 是 PR 的 ID例如对于 [#2663](https://github.com/go-gitea/gitea/pull/2663)ID是 `2663 `
@@ -42,12 +42,12 @@ git checkout v@version@
git fetch origin pull/xyz/head:pr-xyz
```
要以指定发行版本(如 v@version@ )的源代码来构建 Gitea可执行以下命令列出可用的版本并选择某个版本签出。
要以指定发行版本(如 @sourceVersion@ )的源代码来构建 Gitea可执行以下命令列出可用的版本并选择某个版本签出。
使用以下命令列出可用的版本:
```bash
git tag -l
git checkout v@version@ # or git checkout pr-xyz
git checkout @sourceVersion@ # or git checkout pr-xyz
```
## 构建

View File

@@ -33,7 +33,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -53,7 +53,7 @@ sudo chown 1000:1000 config/ data/
> 如果未为卷设置正确的权限,容器可能无法启动。
对于稳定版本,您可以使用 `:latest-rootless``:1-rootless`,或指定特定的版本,如: `@version@-rootless`。如果您想使用最新的开发版本,则可以使用 `:dev-rootless` 标签。如果您想运行发布分支的最新提交,可以使用 `:1.x-dev-rootless` 标签,其中 x是 Gitea 的次要版本号(例如:`1.16-dev-rootless`)。
对于稳定版本,您可以使用 `:latest-rootless``:1-rootless`,或指定特定的版本,如: `@dockerVersion@-rootless`。如果您想使用最新的开发版本,则可以使用 `:dev-rootless` 标签。如果您想运行发布分支的最新提交,可以使用 `:1.x-dev-rootless` 标签,其中 x是 Gitea 的次要版本号(例如:`1.16-dev-rootless`)。
## 自定义端口
@@ -64,7 +64,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -87,7 +87,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
+ environment:
+ - GITEA__database__DB_TYPE=mysql
+ - GITEA__database__HOST=db:3306
@@ -127,7 +127,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
environment:
+ - GITEA__database__DB_TYPE=postgres
+ - GITEA__database__HOST=db:5432
@@ -172,7 +172,7 @@ version: "2"
+
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- - ./data:/var/lib/gitea
@@ -199,7 +199,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
+ user: 1001
volumes:
@@ -252,7 +252,7 @@ docker-compose up -d
- 将卷中的文件夹gitea重命名为 custom
- 如果需要,编辑 `app.ini`
- 设置 `START_SSH_SERVER = true`
- 使用镜像 `gitea/gitea:@version@-rootless`
- 使用镜像 `gitea/gitea:@dockerVersion@-rootless`
## 使用环境变量管理部署

View File

@@ -17,7 +17,7 @@ Gitea 在其 Docker Hub 组织内提供自动更新的 Docker 镜像。可以始
## 基本
最简单的设置只是创建一个卷和一个网络,然后将 `gitea/gitea:latest` 镜像作为服务启动。由于没有可用的数据库,因此可以使用 SQLite3 初始化数据库。创建一个类似 `gitea` 的目录,并将以下内容粘贴到名为 `docker-compose.yml` 的文件中。请注意,该卷应由配置文件中指定的 UID/GID 的用户/组拥有。如果您不授予卷正确的权限,则容器可能无法启动。另请注意,标签 `:latest` 将安装当前的开发版本。对于稳定的发行版,您可以使用 `:1` 或指定某个发行版,例如 `@version@`
最简单的设置只是创建一个卷和一个网络,然后将 `gitea/gitea:latest` 镜像作为服务启动。由于没有可用的数据库,因此可以使用 SQLite3 初始化数据库。创建一个类似 `gitea` 的目录,并将以下内容粘贴到名为 `docker-compose.yml` 的文件中。请注意,该卷应由配置文件中指定的 UID/GID 的用户/组拥有。如果您不授予卷正确的权限,则容器可能无法启动。另请注意,标签 `:latest` 将安装当前的开发版本。对于稳定的发行版,您可以使用 `:1` 或指定某个发行版,例如 `@dockerVersion@`
```yaml
version: "3"
@@ -28,7 +28,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -58,7 +58,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -92,7 +92,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -142,7 +142,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -195,7 +195,7 @@ networks:
+
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
restart: always
networks:

View File

@@ -21,7 +21,7 @@ In order to get file rendering through external binaries, their associated packa
If you're using a Docker image, your `Dockerfile` should contain something along this lines:
```docker
FROM gitea/gitea:@version@
FROM gitea/gitea:@dockerVersion@
[...]
COPY custom/app.ini /data/gitea/conf/app.ini

View File

@@ -51,7 +51,7 @@ To work with tagged releases, the following commands can be used:
```bash
git branch -a
git checkout v@version@
git checkout @sourceBranch@
```
To validate a Pull Request, first enable the new branch (`xyz` is the PR id;
@@ -61,14 +61,14 @@ for example `2663` for [#2663](https://github.com/go-gitea/gitea/pull/2663)):
git fetch origin pull/xyz/head:pr-xyz
```
To build Gitea from source at a specific tagged release (like v@version@), list the
To build Gitea from source at a specific tagged release (like @sourceVersion@), list the
available tags and check out the specific tag.
List available tags with the following.
```bash
git tag -l
git checkout v@version@ # or git checkout pr-xyz
git checkout @sourceVersion@ # or git checkout pr-xyz
```
## Build

View File

@@ -36,7 +36,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -56,7 +56,7 @@ sudo chown 1000:1000 config/ data/
> If you don't give the volume correct permissions, the container may not start.
For a stable release you could use `:latest-rootless`, `:1-rootless` or specify a certain release like `:@version@-rootless`, but if you'd like to use the latest development version then `:nightly-rootless` would be an appropriate tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly-rootless` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly-rootless`)
For a stable release you could use `:latest-rootless`, `:1-rootless` or specify a certain release like `:@dockerVersion@-rootless`, but if you'd like to use the latest development version then `:nightly-rootless` would be an appropriate tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly-rootless` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly-rootless`)
## Custom port
@@ -69,7 +69,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -93,7 +93,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
+ environment:
+ - GITEA__database__DB_TYPE=mysql
+ - GITEA__database__HOST=db:3306
@@ -134,7 +134,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
environment:
+ - GITEA__database__DB_TYPE=postgres
+ - GITEA__database__HOST=db:5432
@@ -182,7 +182,7 @@ version: "2"
+
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- - ./data:/var/lib/gitea
@@ -209,7 +209,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
+ user: 1001
volumes:
@@ -281,7 +281,7 @@ docker-compose up -d
- Rename folder (inside volume) gitea to custom
- Edit app.ini if needed
- Set START_SSH_SERVER = true
- Use image gitea/gitea:@version@-rootless
- Use image gitea/gitea:@dockerVersion@-rootless
## Managing Deployments With Environment Variables

View File

@@ -21,7 +21,7 @@ image as a service. Since there is no database available, one can be initialized
Create a directory like `gitea` and paste the following content into a file named `docker-compose.yml`.
Note that the volume should be owned by the user/group with the UID/GID specified in the config file.
If you don't give the volume correct permissions, the container may not start.
For a stable release you can use `:latest`, `:1` or specify a certain release like `:@version@`, but if you'd like to use the latest development version of Gitea then you could use the `:nightly` tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly`)
For a stable release you can use `:latest`, `:1` or specify a certain release like `:@dockerVersion@`, but if you'd like to use the latest development version of Gitea then you could use the `:nightly` tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly`)
```yaml
version: "3"
@@ -32,7 +32,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -64,7 +64,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -99,7 +99,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -150,7 +150,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -206,7 +206,7 @@ networks:
+
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
restart: always
networks:

View File

@@ -25,7 +25,7 @@ In order to get file rendering through external binaries, their associated packa
If you're using a Docker image, your `Dockerfile` should contain something along this lines:
```docker
FROM gitea/gitea:@version@
FROM gitea/gitea:@dockerVersion@
[...]
COPY custom/app.ini /data/gitea/conf/app.ini

View File

@@ -55,7 +55,7 @@ To work with tagged releases, the following commands can be used:
```bash
git branch -a
git checkout v@version@
git checkout @sourceBranch@
```
To validate a Pull Request, first enable the new branch (`xyz` is the PR id;
@@ -65,14 +65,14 @@ for example `2663` for [#2663](https://github.com/go-gitea/gitea/pull/2663)):
git fetch origin pull/xyz/head:pr-xyz
```
To build Gitea from source at a specific tagged release (like v@version@), list the
To build Gitea from source at a specific tagged release (like @sourceVersion@), list the
available tags and check out the specific tag.
List available tags with the following.
```bash
git tag -l
git checkout v@version@ # or git checkout pr-xyz
git checkout @sourceVersion@ # or git checkout pr-xyz
```
## Build

View File

@@ -38,7 +38,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -58,7 +58,7 @@ sudo chown 1000:1000 config/ data/
> If you don't give the volume correct permissions, the container may not start.
For a stable release you could use `:latest-rootless`, `:1-rootless` or specify a certain release like `:@version@-rootless`, but if you'd like to use the latest development version then `:nightly-rootless` would be an appropriate tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly-rootless` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly-rootless`)
For a stable release you could use `:latest-rootless`, `:1-rootless` or specify a certain release like `:@dockerVersion@-rootless`, but if you'd like to use the latest development version then `:nightly-rootless` would be an appropriate tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly-rootless` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly-rootless`)
## Custom port
@@ -71,7 +71,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -95,7 +95,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
+ environment:
+ - GITEA__database__DB_TYPE=mysql
+ - GITEA__database__HOST=db:3306
@@ -136,7 +136,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
environment:
+ - GITEA__database__DB_TYPE=postgres
+ - GITEA__database__HOST=db:5432
@@ -184,7 +184,7 @@ version: "2"
+
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- - ./data:/var/lib/gitea
@@ -211,7 +211,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
+ user: 1001
volumes:
@@ -283,7 +283,7 @@ docker-compose up -d
- Rename folder (inside volume) gitea to custom
- Edit app.ini if needed
- Set START_SSH_SERVER = true
- Use image gitea/gitea:@version@-rootless
- Use image gitea/gitea:@dockerVersion@-rootless
## Managing Deployments With Environment Variables

View File

@@ -25,7 +25,7 @@ image as a service. Since there is no database available, one can be initialized
Create a directory like `gitea` and paste the following content into a file named `docker-compose.yml`.
Note that the volume should be owned by the user/group with the UID/GID specified in the config file.
If you don't give the volume correct permissions, the container may not start.
For a stable release you can use `:latest`, `:1` or specify a certain release like `:@version@`, but if you'd like to use the latest development version of Gitea then you could use the `:nightly` tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly`)
For a stable release you can use `:latest`, `:1` or specify a certain release like `:@dockerVersion@`, but if you'd like to use the latest development version of Gitea then you could use the `:nightly` tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly`)
```yaml
version: "3"
@@ -36,7 +36,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -68,7 +68,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -103,7 +103,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -154,7 +154,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -210,7 +210,7 @@ networks:
+
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
restart: always
networks:

View File

@@ -25,7 +25,7 @@ In order to get file rendering through external binaries, their associated packa
If you're using a Docker image, your `Dockerfile` should contain something along this lines:
```docker
FROM gitea/gitea:@version@
FROM gitea/gitea:@dockerVersion@
[...]
COPY custom/app.ini /data/gitea/conf/app.ini

View File

@@ -47,7 +47,7 @@ To work with tagged releases, the following commands can be used:
```bash
git branch -a
git checkout v@version@
git checkout @sourceBranch@
```
To validate a Pull Request, first enable the new branch (`xyz` is the PR id;
@@ -57,14 +57,14 @@ for example `2663` for [#2663](https://github.com/go-gitea/gitea/pull/2663)):
git fetch origin pull/xyz/head:pr-xyz
```
To build Gitea from source at a specific tagged release (like v@version@), list the
To build Gitea from source at a specific tagged release (like @sourceVersion@), list the
available tags and check out the specific tag.
List available tags with the following.
```bash
git tag -l
git checkout v@version@ # or git checkout pr-xyz
git checkout @sourceVersion@ # or git checkout pr-xyz
```
## Build

View File

@@ -38,7 +38,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -58,7 +58,7 @@ sudo chown 1000:1000 config/ data/
> If you don't give the volume correct permissions, the container may not start.
For a stable release you could use `:latest-rootless`, `:1-rootless` or specify a certain release like `:@version@-rootless`, but if you'd like to use the latest development version then `:nightly-rootless` would be an appropriate tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly-rootless` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly-rootless`)
For a stable release you could use `:latest-rootless`, `:1-rootless` or specify a certain release like `:@dockerVersion@-rootless`, but if you'd like to use the latest development version then `:nightly-rootless` would be an appropriate tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly-rootless` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly-rootless`)
## Custom port
@@ -71,7 +71,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -95,7 +95,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
+ environment:
+ - GITEA__database__DB_TYPE=mysql
+ - GITEA__database__HOST=db:3306
@@ -136,7 +136,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
environment:
+ - GITEA__database__DB_TYPE=postgres
+ - GITEA__database__HOST=db:5432
@@ -184,7 +184,7 @@ version: "2"
+
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- - ./data:/var/lib/gitea
@@ -211,7 +211,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
+ user: 1001
volumes:
@@ -283,7 +283,7 @@ docker-compose up -d
- Rename folder (inside volume) gitea to custom
- Edit app.ini if needed
- Set START_SSH_SERVER = true
- Use image gitea/gitea:@version@-rootless
- Use image gitea/gitea:@dockerVersion@-rootless
## Managing Deployments With Environment Variables

View File

@@ -25,7 +25,7 @@ image as a service. Since there is no database available, one can be initialized
Create a directory like `gitea` and paste the following content into a file named `docker-compose.yml`.
Note that the volume should be owned by the user/group with the UID/GID specified in the config file.
If you don't give the volume correct permissions, the container may not start.
For a stable release you can use `:latest`, `:1` or specify a certain release like `:@version@`, but if you'd like to use the latest development version of Gitea then you could use the `:nightly` tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly`)
For a stable release you can use `:latest`, `:1` or specify a certain release like `:@dockerVersion@`, but if you'd like to use the latest development version of Gitea then you could use the `:nightly` tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly`)
```yaml
version: "3"
@@ -36,7 +36,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -68,7 +68,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -103,7 +103,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -154,7 +154,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -210,7 +210,7 @@ networks:
+
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
restart: always
networks:

View File

@@ -25,7 +25,7 @@ In order to get file rendering through external binaries, their associated packa
If you're using a Docker image, your `Dockerfile` should contain something along this lines:
```docker
FROM gitea/gitea:@version@
FROM gitea/gitea:@dockerVersion@
[...]
COPY custom/app.ini /data/gitea/conf/app.ini

View File

@@ -47,7 +47,7 @@ To work with tagged releases, the following commands can be used:
```bash
git branch -a
git checkout v@version@
git checkout @sourceBranch@
```
To validate a Pull Request, first enable the new branch (`xyz` is the PR id;
@@ -57,14 +57,14 @@ for example `2663` for [#2663](https://github.com/go-gitea/gitea/pull/2663)):
git fetch origin pull/xyz/head:pr-xyz
```
To build Gitea from source at a specific tagged release (like v@version@), list the
To build Gitea from source at a specific tagged release (like @sourceVersion@), list the
available tags and check out the specific tag.
List available tags with the following.
```bash
git tag -l
git checkout v@version@ # or git checkout pr-xyz
git checkout @sourceVersion@ # or git checkout pr-xyz
```
## Build

View File

@@ -38,7 +38,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -58,7 +58,7 @@ sudo chown 1000:1000 config/ data/
> If you don't give the volume correct permissions, the container may not start.
For a stable release you could use `:latest-rootless`, `:1-rootless` or specify a certain release like `:@version@-rootless`, but if you'd like to use the latest development version then `:nightly-rootless` would be an appropriate tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly-rootless` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly-rootless`)
For a stable release you could use `:latest-rootless`, `:1-rootless` or specify a certain release like `:@dockerVersion@-rootless`, but if you'd like to use the latest development version then `:nightly-rootless` would be an appropriate tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly-rootless` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly-rootless`)
## Custom port
@@ -71,7 +71,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -95,7 +95,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
+ environment:
+ - GITEA__database__DB_TYPE=mysql
+ - GITEA__database__HOST=db:3306
@@ -136,7 +136,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
environment:
+ - GITEA__database__DB_TYPE=postgres
+ - GITEA__database__HOST=db:5432
@@ -184,7 +184,7 @@ version: "2"
+
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- - ./data:/var/lib/gitea
@@ -211,7 +211,7 @@ version: "2"
services:
server:
image: gitea/gitea:@version@-rootless
image: gitea/gitea:@dockerVersion@-rootless
restart: always
+ user: 1001
volumes:
@@ -283,7 +283,7 @@ docker-compose up -d
- Rename folder (inside volume) gitea to custom
- Edit app.ini if needed
- Set START_SSH_SERVER = true
- Use image gitea/gitea:@version@-rootless
- Use image gitea/gitea:@dockerVersion@-rootless
## Managing Deployments With Environment Variables

View File

@@ -25,7 +25,7 @@ image as a service. Since there is no database available, one can be initialized
Create a directory like `gitea` and paste the following content into a file named `docker-compose.yml`.
Note that the volume should be owned by the user/group with the UID/GID specified in the config file.
If you don't give the volume correct permissions, the container may not start.
For a stable release you can use `:latest`, `:1` or specify a certain release like `:@version@`, but if you'd like to use the latest development version of Gitea then you could use the `:nightly` tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly`)
For a stable release you can use `:latest`, `:1` or specify a certain release like `:@dockerVersion@`, but if you'd like to use the latest development version of Gitea then you could use the `:nightly` tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly`)
```yaml
version: "3"
@@ -36,7 +36,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -68,7 +68,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -103,7 +103,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -154,7 +154,7 @@ networks:
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -210,7 +210,7 @@ networks:
+
services:
server:
image: gitea/gitea:@version@
image: gitea/gitea:@dockerVersion@
container_name: gitea
restart: always
networks: