Skip to content

Commit

Permalink
Add sample .env files and update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dormant-user committed Mar 19, 2024
1 parent f4ee30a commit d95759d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ __pycache__/
venv

# .env files
*.env
.*.env

# Sphinx docs
source
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ All the required configuration, settings, and user profiles are loaded using `.e
[`pyfilebrowser`][repo] downloads the appropriate executable automatically during startup.
<br>
Additionally, custom repository sources (in releases) can be configured by specifying the environment variables, `GIT_OWNER` and `GIT_REPO`
> Custom repository feature requires the naming standard to be `${operating system}-{architecture}-filebrowser-{extension}`
<br>
> Custom repository feature allows downloading the asset in latest release automatically.<br>
> **asset naming convention:** `${operating system}-{architecture}-filebrowser-{extension}`<br>
> **example:** `darwin-amd64-filebrowser.tar.gz`
## Kick Off
Expand Down Expand Up @@ -53,6 +53,8 @@ Env vars can either be loaded from `.env` files or directly passed during object
Multiple user profiles can be loaded using `.user1.env`, `.user2.env` and so on.<br>
User profile's permissions are automatically set based on the `admin` flag.

Refer [samples] directory for sample `.env` files.

> :warning:&nbsp;&nbsp;Any configuration changes made in the UI will be lost, unless backed up manually.<br>
Changes should always go through the `.env` files.

Expand Down Expand Up @@ -103,6 +105,7 @@ pre-commit run --all-files
Licensed under the [MIT License][license]

[repo]: https://github.com/thevickypedia/pyfilebrowser
[samples]: https://github.com/thevickypedia/pyfilebrowser/tree/main/samples
[license]: https://github.com/thevickypedia/pyfilebrowser/blob/main/LICENSE
[config]: https://filebrowser.org/cli/filebrowser-config-set
[users]: https://filebrowser.org/cli/filebrowser-users-add
Expand Down
5 changes: 5 additions & 0 deletions samples/config.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Sample .env file for configuration settings
ROOT="/Users/vigneshrao/Desktop/server"
BRANDING_NAME="MyServer"
BRANDING_FILES="/Users/vigneshrao/Desktop/filebrowser/branding"
BRANDING_THEME="dark"
5 changes: 5 additions & 0 deletions samples/user1.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Sample .env file for user profile settings
AUTHENTICATION='{"username": "beretta", "password": "DumMyPasswd", "admin": true}'
HIDEDOTFILES=true
SINGLECLICK=true
LOCKPASSWORD=false
5 changes: 5 additions & 0 deletions samples/user2.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Sample .env file for user profile settings
AUTHENTICATION='{"username": "glock17", "password": "DumMyPasswd", "admin": false}'
HIDEDOTFILES=true
SINGLECLICK=true
LOCKPASSWORD=true

0 comments on commit d95759d

Please sign in to comment.