Skip to content

Commit 26e16e4

Browse files
techknowlogick6543silverwind
authored
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 <[email protected]> Co-authored-by: 6543 <[email protected]> Co-authored-by: silverwind <[email protected]>
1 parent a35a5b2 commit 26e16e4

File tree

2 files changed

+23
-70
lines changed

2 files changed

+23
-70
lines changed

docs/content/doc/installation/with-docker-rootless.en-us.md

Lines changed: 10 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ services:
8989
server:
9090
image: gitea/gitea:latest-rootless
9191
+ environment:
92-
+ - DB_TYPE=mysql
93-
+ - DB_HOST=db:3306
94-
+ - DB_NAME=gitea
95-
+ - DB_USER=gitea
96-
+ - DB_PASSWD=gitea
92+
+ - GITEA__database__TYPE=mysql
93+
+ - GITEA__database__HOST=db:3306
94+
+ - GITEA__database__NAME=gitea
95+
+ - GITEA__database__USER=gitea
96+
+ - GITEA__database__PASSWD=gitea
9797
restart: always
9898
volumes:
9999
- ./data:/var/lib/gitea
@@ -130,11 +130,11 @@ services:
130130
server:
131131
image: gitea/gitea:latest-rootless
132132
environment:
133-
+ - DB_TYPE=postgres
134-
+ - DB_HOST=db:5432
135-
+ - DB_NAME=gitea
136-
+ - DB_USER=gitea
137-
+ - DB_PASSWD=gitea
133+
+ - GITEA__database__TYPE=postgres
134+
+ - GITEA__database__HOST=db:5432
135+
+ - GITEA__database__NAME=gitea
136+
+ - GITEA__database__USER=gitea
137+
+ - GITEA__database__PASSWD=gitea
138138
restart: always
139139
volumes:
140140
- ./data:/var/lib/gitea
@@ -233,31 +233,6 @@ favorite browser to finalize the installation. Visit http://server-ip:3000 and f
233233
installation wizard. If the database was started with the `docker-compose` setup as
234234
documented above, please note that `db` must be used as the database hostname.
235235

236-
## Environments variables
237-
238-
You can configure some of Gitea's settings via environment variables:
239-
240-
(Default values are provided in **bold**)
241-
242-
* `APP_NAME`: **"Gitea: Git with a cup of tea"**: Application name, used in the page title.
243-
* `RUN_MODE`: **prod**: Application run mode, affects performance and debugging. Either "dev", "prod" or "test".
244-
* `SSH_DOMAIN`: **localhost**: Domain name of this server, used for the displayed clone URL in Gitea's UI.
245-
* `SSH_PORT`: **2222**: SSH port displayed in clone URL.
246-
* `SSH_LISTEN_PORT`: **%(SSH\_PORT)s**: Port for the built-in SSH server.
247-
* `DISABLE_SSH`: **false**: Disable SSH feature when it's not available.
248-
* `HTTP_PORT`: **3000**: HTTP listen port.
249-
* `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).
250-
* `LFS_START_SERVER`: **false**: Enables git-lfs support.
251-
* `DB_TYPE`: **sqlite3**: The database type in use \[mysql, postgres, mssql, sqlite3\].
252-
* `DB_HOST`: **localhost:3306**: Database host address and port.
253-
* `DB_NAME`: **gitea**: Database name.
254-
* `DB_USER`: **root**: Database username.
255-
* `DB_PASSWD`: **"\<empty>"**: Database user password. Use \`your password\` for quoting if you use special characters in the password.
256-
* `INSTALL_LOCK`: **false**: Disallow access to the install page.
257-
* `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`.
258-
* `DISABLE_REGISTRATION`: **false**: Disable registration, after which only admin can create accounts for users.
259-
* `REQUIRE_SIGNIN_VIEW`: **false**: Enable this to force users to log in to view any page.
260-
261236
# Customization
262237

263238
Customization files described [here](https://docs.gitea.io/en-us/customizing-gitea/) should

docs/content/doc/installation/with-docker.en-us.md

Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,11 @@ services:
118118
environment:
119119
- USER_UID=1000
120120
- USER_GID=1000
121-
+ - DB_TYPE=mysql
122-
+ - DB_HOST=db:3306
123-
+ - DB_NAME=gitea
124-
+ - DB_USER=gitea
125-
+ - DB_PASSWD=gitea
121+
+ - GITEA__database__TYPE=mysql
122+
+ - GITEA__database__HOST=db:3306
123+
+ - GITEA__database__NAME=gitea
124+
+ - GITEA__database__USER=gitea
125+
+ - GITEA__database__PASSWD=gitea
126126
restart: always
127127
networks:
128128
- gitea
@@ -169,11 +169,11 @@ services:
169169
environment:
170170
- USER_UID=1000
171171
- USER_GID=1000
172-
+ - DB_TYPE=postgres
173-
+ - DB_HOST=db:5432
174-
+ - DB_NAME=gitea
175-
+ - DB_USER=gitea
176-
+ - DB_PASSWD=gitea
172+
+ - GITEA__database__TYPE=postgres
173+
+ - GITEA__database__HOST=db:5432
174+
+ - GITEA__database__NAME=gitea
175+
+ - GITEA__database__USER=gitea
176+
+ - GITEA__database__PASSWD=gitea
177177
restart: always
178178
networks:
179179
- gitea
@@ -256,31 +256,9 @@ favorite browser to finalize the installation. Visit http://server-ip:3000 and f
256256
installation wizard. If the database was started with the `docker-compose` setup as
257257
documented above, please note that `db` must be used as the database hostname.
258258

259-
## Environment variables
260-
261-
You can configure some of Gitea's settings via environment variables:
262-
263-
(Default values are provided in **bold**)
264-
265-
- `APP_NAME`: **"Gitea: Git with a cup of tea"**: Application name, used in the page title.
266-
- `RUN_MODE`: **prod**: Application run mode, affects performance and debugging. Either "dev", "prod" or "test".
267-
- `DOMAIN`: **localhost**: Domain name of this server, used for the displayed http clone URL in Gitea's UI.
268-
- `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).
269-
- `SSH_PORT`: **22**: SSH port displayed in clone URL.
270-
- `SSH_LISTEN_PORT`: **%(SSH_PORT)s**: Port for the built-in SSH server.
271-
- `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.
272-
- `HTTP_PORT`: **3000**: HTTP listen port.
273-
- `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).
274-
- `LFS_START_SERVER`: **false**: Enables git-lfs support.
275-
- `DB_TYPE`: **sqlite3**: The database type in use \[mysql, postgres, mssql, sqlite3\].
276-
- `DB_HOST`: **localhost:3306**: Database host address and port.
277-
- `DB_NAME`: **gitea**: Database name.
278-
- `DB_USER`: **root**: Database username.
279-
- `DB_PASSWD`: **"\<empty>"**: Database user password. Use \`your password\` for quoting if you use special characters in the password.
280-
- `INSTALL_LOCK`: **false**: Disallow access to the install page.
281-
- `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`.
282-
- `DISABLE_REGISTRATION`: **false**: Disable registration, after which only admin can create accounts for users.
283-
- `REQUIRE_SIGNIN_VIEW`: **false**: Enable this to force users to log in to view any page.
259+
## Configure the user inside Gitea using environment variables
260+
261+
- `USER`: **git**: The username of the user that runs Gitea within the container.
284262
- `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).
285263
- `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).
286264

0 commit comments

Comments
 (0)