You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make environment-to-ini support loading key value from file (#24832)
Replace #19857Close#19856Close#10311Close#10123
Major changes:
1. Move a lot of code from `environment-to-ini.go` to `config_env.go` to
make them testable.
2. Add `__FILE` support
3. Update documents
4. Add tests
Copy file name to clipboardExpand all lines: docs/content/doc/installation/with-docker-rootless.en-us.md
+12-3
Original file line number
Diff line number
Diff line change
@@ -286,9 +286,18 @@ docker-compose up -d
286
286
287
287
## Managing Deployments With Environment Variables
288
288
289
-
In addition to the environment variables above, any settings in `app.ini` can be set or overridden with an environment variable of the form: `GITEA__SECTION_NAME__KEY_NAME`. These settings are applied each time the docker container starts. Full information [here](https://github.com/go-gitea/gitea/tree/main/contrib/environment-to-ini).
290
-
291
-
These environment variables can be passed to the docker container in `docker-compose.yml`. The following example will enable an smtp mail server if the required env variables `GITEA__mailer__FROM`, `GITEA__mailer__HOST`, `GITEA__mailer__PASSWD` are set on the host or in a `.env` file in the same directory as `docker-compose.yml`:
289
+
In addition to the environment variables above, any settings in `app.ini` can be set
290
+
or overridden with an environment variable of the form: `GITEA__SECTION_NAME__KEY_NAME`.
291
+
These settings are applied each time the docker container starts.
292
+
Full information [here](https://github.com/go-gitea/gitea/tree/main/contrib/environment-to-ini).
293
+
294
+
These environment variables can be passed to the docker container in `docker-compose.yml`.
295
+
The following example will enable a smtp mail server if the required env variables
296
+
`GITEA__mailer__FROM`, `GITEA__mailer__HOST`, `GITEA__mailer__PASSWD` are set on the host
297
+
or in a `.env` file in the same directory as `docker-compose.yml`.
298
+
299
+
The settings can be also set or overridden with the content of a file by defining an environment variable of the form:
300
+
`GITEA__section_name__KEY_NAME__FILE` that points to a file.
Copy file name to clipboardExpand all lines: docs/content/doc/installation/with-docker.en-us.md
+12-3
Original file line number
Diff line number
Diff line change
@@ -287,9 +287,18 @@ docker-compose up -d
287
287
288
288
## Managing Deployments With Environment Variables
289
289
290
-
In addition to the environment variables above, any settings in `app.ini` can be set or overridden with an environment variable of the form: `GITEA__SECTION_NAME__KEY_NAME`. These settings are applied each time the docker container starts. Full information [here](https://github.com/go-gitea/gitea/tree/master/contrib/environment-to-ini).
291
-
292
-
These environment variables can be passed to the docker container in `docker-compose.yml`. The following example will enable an smtp mail server if the required env variables `GITEA__mailer__FROM`, `GITEA__mailer__HOST`, `GITEA__mailer__PASSWD` are set on the host or in a `.env` file in the same directory as `docker-compose.yml`:
290
+
In addition to the environment variables above, any settings in `app.ini` can be set
291
+
or overridden with an environment variable of the form: `GITEA__SECTION_NAME__KEY_NAME`.
292
+
These settings are applied each time the docker container starts.
293
+
Full information [here](https://github.com/go-gitea/gitea/tree/master/contrib/environment-to-ini).
294
+
295
+
These environment variables can be passed to the docker container in `docker-compose.yml`.
296
+
The following example will enable an smtp mail server if the required env variables
297
+
`GITEA__mailer__FROM`, `GITEA__mailer__HOST`, `GITEA__mailer__PASSWD` are set on the host
298
+
or in a `.env` file in the same directory as `docker-compose.yml`.
299
+
300
+
The settings can be also set or overridden with the content of a file by defining an environment variable of the form:
301
+
`GITEA__section_name__KEY_NAME__FILE` that points to a file.
0 commit comments