1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-15 06:34:25 +00:00

updating install documentation

This commit is contained in:
sb 2024-02-19 20:13:08 +00:00
parent 034a5d3449
commit 572e14fcff
2 changed files with 14 additions and 14 deletions

View File

@ -59,10 +59,10 @@ services:
- "2222:2222" - "2222:2222"
``` ```
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: 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:1010 gid:1010. If needed you can set ownership on those folders with the command:
```sh ```sh
sudo chown 1000:1000 config/ data/ sudo chown 1010:1010 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.

View File

@ -46,8 +46,8 @@ services:
image: gitea/gitea:@version@ image: gitea/gitea:@version@
container_name: gitea container_name: gitea
environment: environment:
- USER_UID=1000 - USER_UID=1010
- USER_GID=1000 - USER_GID=1010
restart: always restart: always
networks: networks:
- gitea - gitea
@ -78,8 +78,8 @@ services:
image: gitea/gitea:@version@ image: gitea/gitea:@version@
container_name: gitea container_name: gitea
environment: environment:
- USER_UID=1000 - USER_UID=1010
- USER_GID=1000 - USER_GID=1010
restart: always restart: always
networks: networks:
- gitea - gitea
@ -113,8 +113,8 @@ services:
image: gitea/gitea:@version@ image: gitea/gitea:@version@
container_name: gitea container_name: gitea
environment: environment:
- USER_UID=1000 - USER_UID=1010
- USER_GID=1000 - USER_GID=1010
+ - GITEA__database__DB_TYPE=mysql + - GITEA__database__DB_TYPE=mysql
+ - GITEA__database__HOST=db:3306 + - GITEA__database__HOST=db:3306
+ - GITEA__database__NAME=gitea + - GITEA__database__NAME=gitea
@ -164,8 +164,8 @@ services:
image: gitea/gitea:@version@ image: gitea/gitea:@version@
container_name: gitea container_name: gitea
environment: environment:
- USER_UID=1000 - USER_UID=1010
- USER_GID=1000 - USER_GID=1010
+ - GITEA__database__DB_TYPE=postgres + - GITEA__database__DB_TYPE=postgres
+ - GITEA__database__HOST=db:5432 + - GITEA__database__HOST=db:5432
+ - GITEA__database__NAME=gitea + - GITEA__database__NAME=gitea
@ -256,8 +256,8 @@ documented above, please note that `db` must be used as the database hostname.
## Configure the user inside Gitea using environment variables ## Configure the user inside Gitea using environment variables
- `USER`: **git**: The username of the user that runs Gitea within the container. - `USER`: **git**: The username of the user that runs Gitea within the container.
- `USER_UID`: **1000**: The UID (Unix user ID) of the user that runs Gitea within the container. Match this to the UID of the owner of the `/data` volume if using host volumes (this is not necessary with named volumes). - `USER_UID`: **1010**: The UID (Unix user ID) of the user that runs Gitea within the container. Match this to the UID of the owner of the `/data` volume if using host volumes (this is not necessary with named volumes).
- `USER_GID`: **1000**: The GID (Unix group ID) of the user that runs Gitea within the container. Match this to the GID of the owner of the `/data` volume if using host volumes (this is not necessary with named volumes). - `USER_GID`: **1010**: The GID (Unix group ID) of the user that runs Gitea within the container. Match this to the GID of the owner of the `/data` volume if using host volumes (this is not necessary with named volumes).
## Customization ## Customization
@ -363,8 +363,8 @@ In this option, the idea is that the host simply uses the `authorized_keys` that
```yaml ```yaml
environment: environment:
- USER_UID=1000 - USER_UID=1010
- USER_GID=1000 - USER_GID=1010
``` ```
- Mount `/home/git/.ssh` of the host into the container. This ensures that the `authorized_keys` file is shared between the host `git` user and the container `git` user otherwise the SSH authentication cannot work inside the container. - Mount `/home/git/.ssh` of the host into the container. This ensures that the `authorized_keys` file is shared between the host `git` user and the container `git` user otherwise the SSH authentication cannot work inside the container.