Improve Docker container name (#13077)
* Improve Docker container name Use a better Docker container name than the default 'server' * Changing to gitea and use recommended v3 Docker-compose Use `gitea` as container name. And use version 3 of the docker-compose, which should now be used: https://docs.docker.com/compose/compose-file/compose-versioning/ Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
9b81193166
commit
508aca1cc0
1 changed files with 13 additions and 5 deletions
|
@ -34,7 +34,7 @@ Also be aware that the tag `:latest` will install the current development versio
|
||||||
For a stable release you can use `:1` or specify a certain release like `:{{< version >}}`.
|
For a stable release you can use `:1` or specify a certain release like `:{{< version >}}`.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
version: "2"
|
version: "3"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
gitea:
|
gitea:
|
||||||
|
@ -43,6 +43,7 @@ networks:
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: gitea/gitea:latest
|
image: gitea/gitea:latest
|
||||||
|
container_name: gitea
|
||||||
environment:
|
environment:
|
||||||
- USER_UID=1000
|
- USER_UID=1000
|
||||||
- USER_GID=1000
|
- USER_GID=1000
|
||||||
|
@ -65,7 +66,7 @@ the port section. It's common to just change the host port and keep the ports wi
|
||||||
the container like they are.
|
the container like they are.
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
version: "2"
|
version: "3"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
gitea:
|
gitea:
|
||||||
|
@ -74,6 +75,7 @@ networks:
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: gitea/gitea:latest
|
image: gitea/gitea:latest
|
||||||
|
container_name: gitea
|
||||||
environment:
|
environment:
|
||||||
- USER_UID=1000
|
- USER_UID=1000
|
||||||
- USER_GID=1000
|
- USER_GID=1000
|
||||||
|
@ -97,7 +99,7 @@ To start Gitea in combination with a MySQL database, apply these changes to the
|
||||||
`docker-compose.yml` file created above.
|
`docker-compose.yml` file created above.
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
version: "2"
|
version: "3"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
gitea:
|
gitea:
|
||||||
|
@ -106,6 +108,7 @@ networks:
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: gitea/gitea:latest
|
image: gitea/gitea:latest
|
||||||
|
container_name: gitea
|
||||||
environment:
|
environment:
|
||||||
- USER_UID=1000
|
- USER_UID=1000
|
||||||
- USER_GID=1000
|
- USER_GID=1000
|
||||||
|
@ -147,7 +150,7 @@ To start Gitea in combination with a PostgreSQL database, apply these changes to
|
||||||
the `docker-compose.yml` file created above.
|
the `docker-compose.yml` file created above.
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
version: "2"
|
version: "3"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
gitea:
|
gitea:
|
||||||
|
@ -156,6 +159,7 @@ networks:
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: gitea/gitea:latest
|
image: gitea/gitea:latest
|
||||||
|
container_name: gitea
|
||||||
environment:
|
environment:
|
||||||
- USER_UID=1000
|
- USER_UID=1000
|
||||||
- USER_GID=1000
|
- USER_GID=1000
|
||||||
|
@ -198,7 +202,7 @@ create the required volume. You don't need to worry about permissions with
|
||||||
named volumes; Docker will deal with that automatically.
|
named volumes; Docker will deal with that automatically.
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
version: "2"
|
version: "3"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
gitea:
|
gitea:
|
||||||
|
@ -211,6 +215,7 @@ networks:
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: gitea/gitea:latest
|
image: gitea/gitea:latest
|
||||||
|
container_name: gitea
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- gitea
|
- gitea
|
||||||
|
@ -306,9 +311,12 @@ UID/GID as the container values `USER_UID`/`USER_GID`. You should also create th
|
||||||
`/var/lib/gitea` on the host, owned by the `git` user and mounted in the container, e.g.
|
`/var/lib/gitea` on the host, owned by the `git` user and mounted in the container, e.g.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
version: "3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: gitea/gitea:latest
|
image: gitea/gitea:latest
|
||||||
|
container_name: gitea
|
||||||
environment:
|
environment:
|
||||||
- USER_UID=1000
|
- USER_UID=1000
|
||||||
- USER_GID=1000
|
- USER_GID=1000
|
||||||
|
|
Loading…
Reference in a new issue