Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
Simplify build instructions in readme
Matthew Holt committed
Mar 15, 2020 at 21:29 UTC
b550ea433b084e12c149591bb4c1c9e516ebfe5b
1 file changed
+13
-29
README.md
+13
-29
@@ -1,12 +1,10 @@
1
Caddy 2
2
=======
3
4
-This is the development branch for Caddy 2.
4
+This is the development branch for Caddy 2, the web server of the Go community.
5
6
**Caddy 2 is production-ready, but there may be breaking changes before the stable 2.0 release.** Please test it and deploy it as much as you are able, and submit your feedback!
7
8
-**Caddy 2 is the web server of the Go community.** We are looking for maintainers to represent the community! Please become involved with issues, PRs, [our forum](https://caddy.community), sharing on social media, etc.
9
-
8
---
9
10
<p align="center">
@@ -34,7 +32,8 @@ This is the development branch for Caddy 2.
32
### Menu
33
34
- [Build from source](#build-from-source)
37
- - [Building with plugins](#building-with-plugins-and/or-version-information)
35
+ - [For development](#for-development)
36
+ - [With version information and/or plugins](#with-version-information-and/or-plugins)
37
- [Getting started](#getting-started)
38
- [Overview](#overview)
39
- [Full documentation](#full-documentation)
@@ -49,44 +48,29 @@ This is the development branch for Caddy 2.
48
49
## Build from source
50
52
-_**Note:** These steps [will not embed proper version information](https://github.com/golang/go/issues/29228). For that, please follow the instructions below for building with plugins (you do not have to add any plugins)._
53
-
51
Requirements:
52
53
- [Go 1.14 or newer](https://golang.org/dl/)
57
-- Do NOT disable [Go modules](https://github.com/golang/go/wiki/Modules) (`export GO111MODULE=auto`)
58
-
59
-Download the `v2` source code:
54
+- Do NOT disable [Go modules](https://github.com/golang/go/wiki/Modules) (`export GO111MODULE=on`)
55
56
+### For development
57
+
58
```bash
59
$ git clone -b v2 "https://github.com/caddyserver/caddy.git"
63
-```
64
-
65
-Build:
66
-
67
-```bash
60
$ cd caddy/cmd/caddy/
61
$ go build
62
```
63
72
-That will put a `caddy(.exe)` binary into the current directory.
73
-
74
-If you encounter any Go-module-related errors, try clearing your Go module cache (`$GOPATH/pkg/mod`) or Go package cache (`$GOPATH/pkg`) and read [the Go wiki page about modules for help](https://github.com/golang/go/wiki/Modules). If you have issues with Go modules, please consult the Go community for help. But if there is an actual error in Caddy, please report it to us.
75
-
76
-### Building with plugins and/or version information
64
+_**Note:** Those steps [will not embed proper version information](https://github.com/golang/go/issues/29228). For that, please follow the instructions below._
65
78
-Caddy is extensible with plugins. Plugins are added at compile-time, so all Caddy binaries are static (self-contained) and portable.
79
-
80
-Instructions for doing this are also given in comments in [cmd/caddy/main.go](https://github.com/caddyserver/caddy/blob/v2/cmd/caddy/main.go) which you can copy and use as a template.
66
+### With version information and/or plugins
67
68
1. Create a new folder: `mkdir caddy`
69
2. Change into it: `cd caddy`
84
-3. Copy [Caddy's main.go](https://github.com/caddyserver/caddy/blob/v2/cmd/caddy/main.go) into the empty folder. Add imports for any plugins you want to include.
85
-4. Run: `go mod init caddy`
86
-5. Run: `go get github.com/caddyserver/caddy/v2@TAG` replacing `TAG` with the latest v2 tag. (Won't be necessary after stable 2.0 release.)
87
-6. Run: `go build`
88
-
89
-Congrats, you now have a custom Caddy build with proper version information!
70
+3. Copy [Caddy's main.go](https://github.com/caddyserver/caddy/blob/v2/cmd/caddy/main.go) into the empty folder. Add imports for any custom plugins you want to add.
71
+4. Initialize a Go module: `go mod init caddy`
72
+5. Pin Caddy version: `go get github.com/caddyserver/caddy/v2@TAG` replacing `TAG` with a git tag or commit.
73
+6. Compile: `go build`
74
75
76
@@ -97,7 +81,7 @@ The [Caddy website](https://caddyserver.com/docs/) has documentation that includ
81
82
**We recommend that all users do our [Getting Started](https://caddyserver.com/docs/getting-started) guide to become familiar with using Caddy.**
83
100
-If you've only got a few minutes, [the website has several quick-start tutorials](https://caddyserver.com/docs/quick-starts) to choose from! However, after finishing a quick-start tutorial, please read more documentation to understand how the software works. 🙂
84
+If you've only got a minute, [the website has several quick-start tutorials](https://caddyserver.com/docs/quick-starts) to choose from! However, after finishing a quick-start tutorial, please read more documentation to understand how the software works. 🙂
85
86
87