From 26e16e4ee4b01e0a073d49a66123ae956ef0586b Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Mon, 12 Apr 2021 15:42:02 -0400 Subject: [PATCH] docs: rm deprecated docs regarding environment variable usage in docker image (#15405) * docs: rm deprecated docs regarding environment variable usage in docker image * Update docs/content/doc/installation/with-docker.en-us.md Co-authored-by: silverwind Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: silverwind --- .../with-docker-rootless.en-us.md | 45 ++++-------------- .../doc/installation/with-docker.en-us.md | 46 +++++-------------- 2 files changed, 22 insertions(+), 69 deletions(-) diff --git a/docs/content/doc/installation/with-docker-rootless.en-us.md b/docs/content/doc/installation/with-docker-rootless.en-us.md index e4fedc0fa9..4f9921bca8 100644 --- a/docs/content/doc/installation/with-docker-rootless.en-us.md +++ b/docs/content/doc/installation/with-docker-rootless.en-us.md @@ -89,11 +89,11 @@ services: server: image: gitea/gitea:latest-rootless + environment: -+ - DB_TYPE=mysql -+ - DB_HOST=db:3306 -+ - DB_NAME=gitea -+ - DB_USER=gitea -+ - DB_PASSWD=gitea ++ - GITEA__database__TYPE=mysql ++ - GITEA__database__HOST=db:3306 ++ - GITEA__database__NAME=gitea ++ - GITEA__database__USER=gitea ++ - GITEA__database__PASSWD=gitea restart: always volumes: - ./data:/var/lib/gitea @@ -130,11 +130,11 @@ services: server: image: gitea/gitea:latest-rootless environment: -+ - DB_TYPE=postgres -+ - DB_HOST=db:5432 -+ - DB_NAME=gitea -+ - DB_USER=gitea -+ - DB_PASSWD=gitea ++ - GITEA__database__TYPE=postgres ++ - GITEA__database__HOST=db:5432 ++ - GITEA__database__NAME=gitea ++ - GITEA__database__USER=gitea ++ - GITEA__database__PASSWD=gitea restart: always volumes: - ./data:/var/lib/gitea @@ -233,31 +233,6 @@ favorite browser to finalize the installation. Visit http://server-ip:3000 and f installation wizard. If the database was started with the `docker-compose` setup as documented above, please note that `db` must be used as the database hostname. -## Environments variables - -You can configure some of Gitea's settings via environment variables: - -(Default values are provided in **bold**) - -* `APP_NAME`: **"Gitea: Git with a cup of tea"**: Application name, used in the page title. -* `RUN_MODE`: **prod**: Application run mode, affects performance and debugging. Either "dev", "prod" or "test". -* `SSH_DOMAIN`: **localhost**: Domain name of this server, used for the displayed clone URL in Gitea's UI. -* `SSH_PORT`: **2222**: SSH port displayed in clone URL. -* `SSH_LISTEN_PORT`: **%(SSH\_PORT)s**: Port for the built-in SSH server. -* `DISABLE_SSH`: **false**: Disable SSH feature when it's not available. -* `HTTP_PORT`: **3000**: HTTP listen port. -* `ROOT_URL`: **""**: Overwrite the automatically generated public URL. This is useful if the internal and the external URL don't match (e.g. in Docker). -* `LFS_START_SERVER`: **false**: Enables git-lfs support. -* `DB_TYPE`: **sqlite3**: The database type in use \[mysql, postgres, mssql, sqlite3\]. -* `DB_HOST`: **localhost:3306**: Database host address and port. -* `DB_NAME`: **gitea**: Database name. -* `DB_USER`: **root**: Database username. -* `DB_PASSWD`: **"\"**: Database user password. Use \`your password\` for quoting if you use special characters in the password. -* `INSTALL_LOCK`: **false**: Disallow access to the install page. -* `SECRET_KEY`: **""**: Global secret key. This should be changed. If this has a value and `INSTALL_LOCK` is empty, `INSTALL_LOCK` will automatically set to `true`. -* `DISABLE_REGISTRATION`: **false**: Disable registration, after which only admin can create accounts for users. -* `REQUIRE_SIGNIN_VIEW`: **false**: Enable this to force users to log in to view any page. - # Customization Customization files described [here](https://docs.gitea.io/en-us/customizing-gitea/) should diff --git a/docs/content/doc/installation/with-docker.en-us.md b/docs/content/doc/installation/with-docker.en-us.md index 53d89e7f19..6c4823b5be 100644 --- a/docs/content/doc/installation/with-docker.en-us.md +++ b/docs/content/doc/installation/with-docker.en-us.md @@ -118,11 +118,11 @@ services: environment: - USER_UID=1000 - USER_GID=1000 -+ - DB_TYPE=mysql -+ - DB_HOST=db:3306 -+ - DB_NAME=gitea -+ - DB_USER=gitea -+ - DB_PASSWD=gitea ++ - GITEA__database__TYPE=mysql ++ - GITEA__database__HOST=db:3306 ++ - GITEA__database__NAME=gitea ++ - GITEA__database__USER=gitea ++ - GITEA__database__PASSWD=gitea restart: always networks: - gitea @@ -169,11 +169,11 @@ services: environment: - USER_UID=1000 - USER_GID=1000 -+ - DB_TYPE=postgres -+ - DB_HOST=db:5432 -+ - DB_NAME=gitea -+ - DB_USER=gitea -+ - DB_PASSWD=gitea ++ - GITEA__database__TYPE=postgres ++ - GITEA__database__HOST=db:5432 ++ - GITEA__database__NAME=gitea ++ - GITEA__database__USER=gitea ++ - GITEA__database__PASSWD=gitea restart: always networks: - gitea @@ -256,31 +256,9 @@ favorite browser to finalize the installation. Visit http://server-ip:3000 and f installation wizard. If the database was started with the `docker-compose` setup as documented above, please note that `db` must be used as the database hostname. -## Environment variables +## Configure the user inside Gitea using environment variables -You can configure some of Gitea's settings via environment variables: - -(Default values are provided in **bold**) - -- `APP_NAME`: **"Gitea: Git with a cup of tea"**: Application name, used in the page title. -- `RUN_MODE`: **prod**: Application run mode, affects performance and debugging. Either "dev", "prod" or "test". -- `DOMAIN`: **localhost**: Domain name of this server, used for the displayed http clone URL in Gitea's UI. -- `SSH_DOMAIN`: **localhost**: Domain name of this server, used for the displayed ssh clone URL in Gitea's UI. If the install page is enabled, SSH Domain Server takes DOMAIN value in the form (which overwrite this setting on save). -- `SSH_PORT`: **22**: SSH port displayed in clone URL. -- `SSH_LISTEN_PORT`: **%(SSH_PORT)s**: Port for the built-in SSH server. -- `DISABLE_SSH`: **false**: Disable SSH feature when it's not available. If you want to disable SSH feature, you should set SSH port to `0` when installing Gitea. -- `HTTP_PORT`: **3000**: HTTP listen port. -- `ROOT_URL`: **""**: Overwrite the automatically generated public URL. This is useful if the internal and the external URL don't match (e.g. in Docker). -- `LFS_START_SERVER`: **false**: Enables git-lfs support. -- `DB_TYPE`: **sqlite3**: The database type in use \[mysql, postgres, mssql, sqlite3\]. -- `DB_HOST`: **localhost:3306**: Database host address and port. -- `DB_NAME`: **gitea**: Database name. -- `DB_USER`: **root**: Database username. -- `DB_PASSWD`: **"\"**: Database user password. Use \`your password\` for quoting if you use special characters in the password. -- `INSTALL_LOCK`: **false**: Disallow access to the install page. -- `SECRET_KEY`: **""**: Global secret key. This should be changed. If this has a value and `INSTALL_LOCK` is empty, `INSTALL_LOCK` will automatically set to `true`. -- `DISABLE_REGISTRATION`: **false**: Disable registration, after which only admin can create accounts for users. -- `REQUIRE_SIGNIN_VIEW`: **false**: Enable this to force users to log in to view any page. +- `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_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).