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
{{ message }}
This repository was archived by the owner on May 6, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: builds.md
+12-10Lines changed: 12 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ yarn build
40
40
41
41
## Run or build the backend
42
42
43
-
Frontend artifacts are embedded in the backend with [go.rice](github.com/GeertJohan/go.rice/rice). Therefore, prior to following the regular golang procedure this needs to be executed in the root of the `backend` repository:
43
+
Frontend artifacts are embedded in the backend with [go.rice](github.com/GeertJohan/go.rice/rice). Therefore, prior to following the regular golang procedure this needs to be executed in subdir `lib` of the `backend` repository:
44
44
45
45
```bash
46
46
# Install rice tool if not present
@@ -49,29 +49,31 @@ if ! [ -x "$(command -v rice)" ]; then
49
49
fi
50
50
51
51
# Embed the assets using rice
52
+
cd lib
52
53
rice embed-go
53
54
```
54
55
55
-
Then, running [dep](https://github.com/golang/dep) to get dependencies up-to-date is strongly recommended:
56
+
Then, ensuring that all the dependencies are available is strongly recommended:
56
57
57
58
```bash
58
-
dep ensure -vendor-only
59
+
cd ../cli
60
+
go get -v ./...
59
61
```
60
62
61
-
Last, the backend can be either run or built from subdir `cmd/filebrowser` as usual:
63
+
Last, the backend can be either run or built from subdir `cli` as usual:
62
64
63
65
```bash
64
-
cdcmd/filebrowser
66
+
cd../cli
65
67
go run
66
68
```
67
69
68
70
or
69
71
70
72
```bash
71
-
cdcmd/filebrowser
73
+
cd../cli
72
74
CGO_ENABLED=0 go build -a
73
-
cd ../..
74
-
cp cmd/filebrowser/filebrowser ./
75
+
cd ..
76
+
cp cli/filebrowser ./
75
77
```
76
78
77
79
> Note: `CGO_ENABLED=0` is used so that a static binary is built. See [golang.org/cmd/cgo/](https://golang.org/cmd/cgo/).
@@ -110,7 +112,7 @@ docker run -dp 5555:80 filebrowser/filebrowser --no-auth
110
112
There are at least three possible approaches to use File Browser inside a existing image:
111
113
112
114
- Use a built binary that is locally available, as in the example shown above.
113
-
- Get a release tarball and extract it in the dockerfile:
115
+
- Get a release tarball and extract it in the dockerfile:
114
116
115
117
```
116
118
RUN https://github.com/filebrowser/filebrowser/releases/download/v1.8.0/linux-amd64-filebrowser.tar.gz | tar -xvz filebrowser
0 commit comments