Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

Commit f0b6989

Browse files
author
1138-4EB
committed
fix: adapt to filebrowser code refactoring (filebrowser/filebrowser#506)
1 parent c60e210 commit f0b6989

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

builds.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ yarn build
4040

4141
## Run or build the backend
4242

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:
4444

4545
``` bash
4646
# Install rice tool if not present
@@ -49,29 +49,31 @@ if ! [ -x "$(command -v rice)" ]; then
4949
fi
5050

5151
# Embed the assets using rice
52+
cd lib
5253
rice embed-go
5354
```
5455

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:
5657

5758
``` bash
58-
dep ensure -vendor-only
59+
cd ../cli
60+
go get -v ./...
5961
```
6062

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:
6264

6365
``` bash
64-
cd cmd/filebrowser
66+
cd ../cli
6567
go run
6668
```
6769

6870
or
6971

7072
``` bash
71-
cd cmd/filebrowser
73+
cd ../cli
7274
CGO_ENABLED=0 go build -a
73-
cd ../..
74-
cp cmd/filebrowser/filebrowser ./
75+
cd ..
76+
cp cli/filebrowser ./
7577
```
7678

7779
> 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
110112
There are at least three possible approaches to use File Browser inside a existing image:
111113

112114
- 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:
114116

115117
```
116118
RUN https://github.com/filebrowser/filebrowser/releases/download/v1.8.0/linux-amd64-filebrowser.tar.gz | tar -xvz filebrowser
@@ -132,4 +134,4 @@ RUN curl -L $( \
132134
FROM filebrowser/filebrowser AS base
133135
FROM alpine AS img
134136
COPY --from=base /filebrowser <target_path>
135-
```
137+
```

0 commit comments

Comments
 (0)