diff --git a/README.md b/README.md index 5ac3c0d..02bc8c3 100644 --- a/README.md +++ b/README.md @@ -53,58 +53,11 @@ You can find a json-list of the same in [gothub/gothub-instances](https://codebe [^1]: Has some modifications: https://git.vern.cc/vern/modifications/src/branch/master/gothub ## Setup -### Docker -We recommend Docker as it is easy to update GotHub that way and it is easy to setup. -[Packages page](https://codeberg.org/gothub/-/packages/container/gothub/latest) -```docker -docker run -d -p 3000:3000 --name gothub codeberg.org/gothub/gothub -``` +See [gothub.app/docs](https://gothub.app/docs) for information about setting up GotHub. -If you are using Portainer or Podman, you know how to create the GotHub container. - -### Manual -You will need an installation of Go 1.19+ installed on your system. - -We recommend setting the `GO_TELEMETRY` environment variable to `off`. In the future, the Go CLI will send telemetry to Google, which you might not want. - -```bash -git clone https://codeberg.org/gothub/gothub.git -cd gothub -go build -o gothub -./gothub serve -``` - -GotHub includes a setup wizard that will set the environment variables for you. Run `./gothub setup`. - -If you don't want to use port 3000 for GotHub, set the GOTHUB_PORT environment variable to the port you want to use. - -You can create a ``.env`` file in the root directory of GotHub and set the environment variables there, which is what ``./gothub setup`` does. - -These are the environment variables that are being used by GotHub: -``` -GOTHUB_PORT=3000 # optional -GOTHUB_USER_AGENT="GotHub/1.0.0" # optional, it comes with a Chrome on Windows 10 user agent by default -# The following are optional, but required if you want your instance to be listed on the instances page -GOTHUB_IP_LOGGED=true/false -GOTHUB_REQUEST_URL_LOGGED=true/false -GOTHUB_USER_AGENT_LOGGED=true/false -GOTHUB_DIAGNOSTIC_INFO_LOGGED=true/false -GOTHUB_INSTANCE_PRIVACY_POLICY="" -GOTHUB_INSTANCE_COUNTRY="" -GOTHUB_INSTANCE_PROVIDER="" -GOTHUB_INSTANCE_CLOUDFLARE=true/false -``` -### Web server configuration (Caddy) -We recommend Caddy for the web server, as it provides automatic HTTPS, HTTP/3 and is easy to setup. -```caddyfile -gothub.example.com { - reverse_proxy localhost:(the port for GotHub) -} -``` -### Web server configuration (other web servers) -Just make sure that you pass the Host and IP headers (X-Forwarded-For) to GotHub. ## Scraping GotHub utilizes scraping powered by [Colly](http://go-colly.org/) to retrieve information from GitHub for everything except the explore page. By default, GotHub uses Chrome on Windows 10 as the user agent, but you can change it by setting the `GOTHUB_USER_AGENT` environment variable. + ## Funding Our domain [gothub.app](https://gothub.app) is funded by the [Project Segfault](https://projectsegfau.lt) team, which is our only expense other than blood, sweat and tears. So, if you'd like to donate to GotHub, you can donate it to your favourite instance host or [Project Segfault](https://projectsegfau.lt/donate).