forked from filebrowser/filebrowser
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Former-commit-id: 0d8742754bb756ad3a83599850dae5f477282430 [formerly 5cb7d75b695d8400fc2af87edd551d6450e7365f] [formerly a6a814c40a5ff4f195c4ab470d4fccc92bd8c1c8 [formerly 99c8c92]] Former-commit-id: 45eba5ff05f8e64fbf33d9d670e19a0cf4880656 [formerly 88dc856045b9d51596f36ce387b1c4f3e85a7d3c] Former-commit-id: 1eadaef460060da8ae71df3c66f242c844992725
- Loading branch information
Showing
66 changed files
with
5,105 additions
and
5,094 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
{ | ||
"presets": [ | ||
["env", { "modules": false }], | ||
"stage-2" | ||
], | ||
"plugins": ["transform-runtime"], | ||
"env": { | ||
"test": { | ||
"presets": ["env", "stage-2"], | ||
"plugins": [ "istanbul" ] | ||
} | ||
} | ||
} | ||
{ | ||
"presets": [ | ||
["env", { "modules": false }], | ||
"stage-2" | ||
], | ||
"plugins": ["transform-runtime"], | ||
"env": { | ||
"test": { | ||
"presets": ["env", "stage-2"], | ||
"plugins": [ "istanbul" ] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
assets/ | ||
testdata/ | ||
caddy/ | ||
.github/ | ||
assets/ | ||
testdata/ | ||
caddy/ | ||
.github/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
# 4 space indentation | ||
[*.go] | ||
indent_style = tab | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
# 4 space indentation | ||
[*.go] | ||
indent_style = tab | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
build/*.js | ||
config/*.js | ||
build/*.js | ||
config/*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
// http:https://eslint.org/docs/user-guide/configuring | ||
|
||
module.exports = { | ||
root: true, | ||
parser: 'babel-eslint', | ||
parserOptions: { | ||
sourceType: 'module' | ||
}, | ||
env: { | ||
browser: true, | ||
}, | ||
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style | ||
extends: 'standard', | ||
// required to lint *.vue files | ||
plugins: [ | ||
'html' | ||
], | ||
// add your custom rules here | ||
'rules': { | ||
// allow paren-less arrow functions | ||
'arrow-parens': 0, | ||
// allow async-await | ||
'generator-star-spacing': 0, | ||
// allow debugger during development | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0 | ||
} | ||
} | ||
// http:https://eslint.org/docs/user-guide/configuring | ||
|
||
module.exports = { | ||
root: true, | ||
parser: 'babel-eslint', | ||
parserOptions: { | ||
sourceType: 'module' | ||
}, | ||
env: { | ||
browser: true, | ||
}, | ||
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style | ||
extends: 'standard', | ||
// required to lint *.vue files | ||
plugins: [ | ||
'html' | ||
], | ||
// add your custom rules here | ||
'rules': { | ||
// allow paren-less arrow functions | ||
'arrow-parens': 0, | ||
// allow async-await | ||
'generator-star-spacing': 0, | ||
// allow debugger during development | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
### Instructions (remove before submitting): | ||
|
||
1. Are you asking for help with using Caddy or File Manager? Please use our forum instead: https://forum.caddyserver.com. | ||
2. If you are filing a bug report, please answer the following questions. | ||
3. If your issue is not a bug report, you do not need to use this template. | ||
4. If not using with Caddy, ignore questions 1 and 2. | ||
|
||
### 1. Have you downloaded File Manager from caddyserver.com? If yes, when have you done that? If no, and you are running a custom build, which is the revision of File Manager's repository? | ||
|
||
### 2. What is your entire Caddyfile? | ||
```text | ||
(Put Caddyfile here) | ||
``` | ||
|
||
### 3. What are you trying to do? | ||
|
||
|
||
### 4. What did you expect to see? | ||
|
||
|
||
### 5. What did you see instead (give full error messages and/or log)? | ||
|
||
|
||
### 6. How can someone who is starting from scratch reproduce this behaviour as minimally as possible? | ||
### Instructions (remove before submitting): | ||
|
||
1. Are you asking for help with using Caddy or File Manager? Please use our forum instead: https://forum.caddyserver.com. | ||
2. If you are filing a bug report, please answer the following questions. | ||
3. If your issue is not a bug report, you do not need to use this template. | ||
4. If not using with Caddy, ignore questions 1 and 2. | ||
|
||
### 1. Have you downloaded File Manager from caddyserver.com? If yes, when have you done that? If no, and you are running a custom build, which is the revision of File Manager's repository? | ||
|
||
### 2. What is your entire Caddyfile? | ||
```text | ||
(Put Caddyfile here) | ||
``` | ||
|
||
### 3. What are you trying to do? | ||
|
||
|
||
### 4. What did you expect to see? | ||
|
||
|
||
### 5. What did you see instead (give full error messages and/or log)? | ||
|
||
|
||
### 6. How can someone who is starting from scratch reproduce this behaviour as minimally as possible? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
build: | ||
main: cmd/filemanager/main.go | ||
binary: filemanager | ||
goos: | ||
- darwin | ||
- linux | ||
- windows | ||
- freebsd | ||
- netbsd | ||
- openbsd | ||
goarch: | ||
- amd64 | ||
- 386 | ||
- arm | ||
- arm64 | ||
ignore: | ||
- goos: openbsd | ||
goarch: arm | ||
goarm: 6 | ||
- goos: freebsd | ||
goarch: arm | ||
goarm: 6 | ||
|
||
archive: | ||
name_template: "{{.Os}}-{{.Arch}}-{{ .ProjectName }}" | ||
format: tar.gz | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
build: | ||
main: cmd/filemanager/main.go | ||
binary: filemanager | ||
goos: | ||
- darwin | ||
- linux | ||
- windows | ||
- freebsd | ||
- netbsd | ||
- openbsd | ||
goarch: | ||
- amd64 | ||
- 386 | ||
- arm | ||
- arm64 | ||
ignore: | ||
- goos: openbsd | ||
goarch: arm | ||
goarm: 6 | ||
- goos: freebsd | ||
goarch: arm | ||
goarm: 6 | ||
|
||
archive: | ||
name_template: "{{.Os}}-{{.Arch}}-{{ .ProjectName }}" | ||
format: tar.gz | ||
format_overrides: | ||
- goos: windows | ||
format: zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http:https://contributor-covenant.org/version/1/4][version] | ||
|
||
[homepage]: http:https://contributor-covenant.org | ||
[version]: http:https://contributor-covenant.org/version/1/4/ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http:https://contributor-covenant.org/version/1/4][version] | ||
|
||
[homepage]: http:https://contributor-covenant.org | ||
[version]: http:https://contributor-covenant.org/version/1/4/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# Contributing | ||
|
||
If you want to contribute or want to build the code from source, you will need to have the most recent version of Go and, if you want to change the static assets (JS, CSS, ...), Node.js installed on your computer. To start developing, you just need to do the following: | ||
|
||
1. `go get github.com/hacdias/filemanager` | ||
2. `cd $GOPATH/src/github.com/hacdias/filemanager` | ||
3. `npm install` | ||
4. `npm run dev` - regenerates the static assets automatically | ||
5. `go install github.com/hacdias/filemanager/cmd/filemanager` | ||
6. Execute `$GOPATH/bin/filemanager` | ||
|
||
The steps 3 and 4 are only required **if you want to develop the front-end**. Otherwise, you can ignore them. Before pulling, if you made any change on assets folder, you must run the `build.sh` script on the root of this repository. | ||
|
||
If you are using this as a Caddy plugin, you should use its [official instructions for plugins](https://github.com/mholt/caddy/wiki/Extending-Caddy#2-plug-in-your-plugin) and import `github.com/hacdias/filemanager/caddy/filemanager`. | ||
# Contributing | ||
|
||
If you want to contribute or want to build the code from source, you will need to have the most recent version of Go and, if you want to change the static assets (JS, CSS, ...), Node.js installed on your computer. To start developing, you just need to do the following: | ||
|
||
1. `go get github.com/hacdias/filemanager` | ||
2. `cd $GOPATH/src/github.com/hacdias/filemanager` | ||
3. `npm install` | ||
4. `npm run dev` - regenerates the static assets automatically | ||
5. `go install github.com/hacdias/filemanager/cmd/filemanager` | ||
6. Execute `$GOPATH/bin/filemanager` | ||
|
||
The steps 3 and 4 are only required **if you want to develop the front-end**. Otherwise, you can ignore them. Before pulling, if you made any change on assets folder, you must run the `build.sh` script on the root of this repository. | ||
|
||
If you are using this as a Caddy plugin, you should use its [official instructions for plugins](https://github.com/mholt/caddy/wiki/Extending-Caddy#2-plug-in-your-plugin) and import `github.com/hacdias/filemanager/caddy/filemanager`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
FROM golang:alpine | ||
|
||
COPY . /go/src/github.com/hacdias/filemanager | ||
|
||
WORKDIR /go/src/github.com/hacdias/filemanager | ||
RUN apk add --no-cache git | ||
RUN go get ./... | ||
|
||
WORKDIR /go/src/github.com/hacdias/filemanager/cmd/filemanager | ||
RUN CGO_ENABLED=0 go build -a | ||
RUN mv filemanager /go/bin/filemanager | ||
|
||
FROM scratch | ||
COPY --from=0 /go/bin/filemanager /filemanager | ||
|
||
VOLUME /srv | ||
EXPOSE 80 | ||
|
||
COPY Docker.json /config.json | ||
|
||
ENTRYPOINT ["/filemanager"] | ||
CMD ["--config", "/config.json"] | ||
FROM golang:alpine | ||
|
||
COPY . /go/src/github.com/hacdias/filemanager | ||
|
||
WORKDIR /go/src/github.com/hacdias/filemanager | ||
RUN apk add --no-cache git | ||
RUN go get ./... | ||
|
||
WORKDIR /go/src/github.com/hacdias/filemanager/cmd/filemanager | ||
RUN CGO_ENABLED=0 go build -a | ||
RUN mv filemanager /go/bin/filemanager | ||
|
||
FROM scratch | ||
COPY --from=0 /go/bin/filemanager /filemanager | ||
|
||
VOLUME /srv | ||
EXPOSE 80 | ||
|
||
COPY Docker.json /config.json | ||
|
||
ENTRYPOINT ["/filemanager"] | ||
CMD ["--config", "/config.json"] |
Oops, something went wrong.