mirror of
https://gitea.com/gitea/docs.git
synced 2026-07-22 02:37:42 +00:00
Change docker tag logic (#16421)
* Change docker logic * Apply suggestions from code review Co-authored-by: Kyle D. <kdumontnu@gmail.com> * docs Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Kyle D. <kdumontnu@gmail.com>
This commit is contained in:
@@ -32,15 +32,14 @@ image as a service. Since there is no database available, one can be initialized
|
|||||||
Create a directory for `data` and `config` then paste the following content into a file named `docker-compose.yml`.
|
Create a directory for `data` and `config` then 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. By default Gitea in docker will use uid:1000 gid:1000. If needed you can set ownership on those folders with the command: `sudo chown 1000:1000 config/ data/`
|
Note that the volume should be owned by the user/group with the UID/GID specified in the config file. By default Gitea in docker will use uid:1000 gid:1000. If needed you can set ownership on those folders with the command: `sudo chown 1000:1000 config/ data/`
|
||||||
If you don't give the volume correct permissions, the container may not start.
|
If you don't give the volume correct permissions, the container may not start.
|
||||||
Also be aware that the tag `:latest-rootless` will install the current development version.
|
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 `:dev-rootless` would be an appropriate tag.
|
||||||
For a stable release you can use `:1-rootless` or specify a certain release like `:{{< version >}}-rootless`.
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
version: "2"
|
version: "2"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: gitea/gitea:latest-rootless
|
image: gitea/gitea:{{< version >}}-rootless
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/var/lib/gitea
|
- ./data:/var/lib/gitea
|
||||||
@@ -63,7 +62,7 @@ version: "2"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: gitea/gitea:latest-rootless
|
image: gitea/gitea:{{< version >}}-rootless
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/var/lib/gitea
|
- ./data:/var/lib/gitea
|
||||||
@@ -87,7 +86,7 @@ version: "2"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: gitea/gitea:latest-rootless
|
image: gitea/gitea:{{< version >}}-rootless
|
||||||
+ environment:
|
+ environment:
|
||||||
+ - GITEA__database__DB_TYPE=mysql
|
+ - GITEA__database__DB_TYPE=mysql
|
||||||
+ - GITEA__database__HOST=db:3306
|
+ - GITEA__database__HOST=db:3306
|
||||||
@@ -128,7 +127,7 @@ version: "2"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: gitea/gitea:latest-rootless
|
image: gitea/gitea:{{< version >}}-rootless
|
||||||
environment:
|
environment:
|
||||||
+ - GITEA__database__DB_TYPE=postgres
|
+ - GITEA__database__DB_TYPE=postgres
|
||||||
+ - GITEA__database__HOST=db:5432
|
+ - GITEA__database__HOST=db:5432
|
||||||
@@ -174,7 +173,7 @@ version: "2"
|
|||||||
+
|
+
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: gitea/gitea:latest-rootless
|
image: gitea/gitea:{{< version >}}-rootless
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- - ./data:/var/lib/gitea
|
- - ./data:/var/lib/gitea
|
||||||
@@ -201,7 +200,7 @@ version: "2"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: gitea/gitea:latest-rootless
|
image: gitea/gitea:{{< version >}}-rootless
|
||||||
restart: always
|
restart: always
|
||||||
+ user: 1001
|
+ user: 1001
|
||||||
volumes:
|
volumes:
|
||||||
@@ -262,7 +261,7 @@ docker-compose up -d
|
|||||||
- Rename folder (inside volume) gitea to custom
|
- Rename folder (inside volume) gitea to custom
|
||||||
- Edit app.ini if needed
|
- Edit app.ini if needed
|
||||||
- Set START_SSH_SERVER = true
|
- Set START_SSH_SERVER = true
|
||||||
- Use image gitea/gitea:latest-rootless
|
- Use image gitea/gitea:{{< version >}}-rootless
|
||||||
|
|
||||||
## Managing Deployments With Environment Variables
|
## Managing Deployments With Environment Variables
|
||||||
|
|
||||||
|
|||||||
@@ -34,8 +34,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`.
|
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.
|
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.
|
If you don't give the volume correct permissions, the container may not start.
|
||||||
Also be aware that the tag `:latest` will install the current development version.
|
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 `:dev` tag.
|
||||||
For a stable release you can use `:1` or specify a certain release like `:{{< version >}}`.
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
version: "3"
|
version: "3"
|
||||||
|
|||||||
Reference in New Issue
Block a user