2
1
Fork
You've already forked docs
1

Improve proxy documentation #13

Merged
video-prize-ranch merged 2 commits from :main into main 2024年02月01日 01:54:58 +01:00
Contributor
Copy link

Improvements to proxy documentation, including instructions for defining environment variables and links to relevant external resources.

Improvements to proxy documentation, including instructions for defining environment variables and links to relevant external resources.
@ -10,1 +12,3 @@
rimgo supports the `HTTP_PROXY` and `HTTPS_PROXY` environment variables, as Go's [net/http](https://pkg.go.dev/net/http#ProxyFromEnvironment) automatically detects and uses them for requests. This can be set in `docker-compose.yml` or `.env` and any other way of setting environment variables.
rimgo supports the `HTTP_PROXY` and `HTTPS_PROXY` environment variables, as Go's net/http [automatically detects and uses them for requests](https://pkg.go.dev/net/http#ProxyFromEnvironment).
In a [Docker Compose](https://docs.docker.com/compose/) environment, these variables can be set in `docker-compose.yml`, `.env`, or any other way of [setting environment variables](https://docs.docker.com/compose/environment-variables/set-environment-variables/).

See next comment

See next comment
video-prize-ranch marked this conversation as resolved
@ -11,0 +19,4 @@
#### Within `.env` (recommended)
Here, the `HTTP_PROXY` and `HTTPS_PROXY` environment variables are set within `.env`, referenced by the line `env_file: .env` in `docker-compose.yml`. This method is recommended if an `.env` file is already being used to define environment variables.

rimgo also automatically loads .env files, not just through docker-compose. Putting the entire configuration here is also unnecessary, rimgo already comes with an example .env file and the other options are documented in Configuration.

rimgo also automatically loads .env files, not just through docker-compose. Putting the entire configuration here is also unnecessary, rimgo already comes with an example .env file and the other options are documented in Configuration.
video-prize-ranch marked this conversation as resolved
@ -11,0 +65,4 @@
#### Within `docker-compose.yml`
Here, the `HTTP_PROXY` and `HTTPS_PROXY` environment variables are set within `docker-compose.yml` itself, separate from `env_file: .env`. This particular example is not recommended as environment variables are needlessly defined in multiple places.

I think it would be good to just keep the .env file example, as that works for all installation methods

I think it would be good to just keep the .env file example, as that works for all installation methods
video-prize-ranch marked this conversation as resolved
Author
Contributor
Copy link

Thanks for going over my PR.

I mostly overlooked non-Docker deployments and wasn't aware that rimgo itself loads .env for configuration. I've rewritten so that the documentation is more agnostic concerning the installation method used.

I've also truncated the example .env file and cut out the section on defining env variables in docker-compose.yml.

Thanks for going over my PR. I mostly overlooked non-Docker deployments and wasn't aware that rimgo itself loads .env for configuration. I've rewritten so that the documentation is more agnostic concerning the installation method used. I've also truncated the example `.env` file and cut out the section on defining env variables in `docker-compose.yml`.
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rimgo/docs!13
Reference in a new issue
rimgo/docs
No description provided.
Delete branch ":main"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?