UX: Document min password length and reduce to 4 chars
This commit is contained in:
parent
287b34de77
commit
ed0aa11ee8
12 changed files with 94 additions and 92 deletions
|
@ -33,7 +33,7 @@ services:
|
|||
PHOTOPRISM_DATABASE_PASSWORD: "photoprism"
|
||||
PHOTOPRISM_TEST_DRIVER: "sqlite"
|
||||
PHOTOPRISM_TEST_DSN: ".test.db"
|
||||
PHOTOPRISM_ADMIN_PASSWORD: "photoprism"
|
||||
PHOTOPRISM_ADMIN_PASSWORD: "photoprism" # The initial admin password (min 4 characters)
|
||||
PHOTOPRISM_ASSETS_PATH: "/go/src/github.com/photoprism/photoprism/assets"
|
||||
PHOTOPRISM_STORAGE_PATH: "/go/src/github.com/photoprism/photoprism/storage"
|
||||
PHOTOPRISM_ORIGINALS_PATH: "/go/src/github.com/photoprism/photoprism/storage/originals"
|
||||
|
|
|
@ -37,7 +37,7 @@ services:
|
|||
PHOTOPRISM_DATABASE_PASSWORD: "photoprism"
|
||||
PHOTOPRISM_TEST_DRIVER: "sqlite"
|
||||
PHOTOPRISM_TEST_DSN: ".test.db"
|
||||
PHOTOPRISM_ADMIN_PASSWORD: "photoprism"
|
||||
PHOTOPRISM_ADMIN_PASSWORD: "photoprism" # The initial admin password (min 4 characters)
|
||||
PHOTOPRISM_ASSETS_PATH: "/go/src/github.com/photoprism/photoprism/assets"
|
||||
PHOTOPRISM_STORAGE_PATH: "/go/src/github.com/photoprism/photoprism/storage"
|
||||
PHOTOPRISM_ORIGINALS_PATH: "/go/src/github.com/photoprism/photoprism/storage/originals"
|
||||
|
|
|
@ -52,7 +52,7 @@ services:
|
|||
PHOTOPRISM_DATABASE_PASSWORD: "photoprism"
|
||||
PHOTOPRISM_TEST_DRIVER: "sqlite"
|
||||
PHOTOPRISM_TEST_DSN: ".test.db"
|
||||
PHOTOPRISM_ADMIN_PASSWORD: "photoprism"
|
||||
PHOTOPRISM_ADMIN_PASSWORD: "photoprism" # The initial admin password (min 4 characters)
|
||||
PHOTOPRISM_ASSETS_PATH: "/go/src/github.com/photoprism/photoprism/assets"
|
||||
PHOTOPRISM_STORAGE_PATH: "/go/src/github.com/photoprism/photoprism/storage"
|
||||
PHOTOPRISM_ORIGINALS_PATH: "/go/src/github.com/photoprism/photoprism/storage/originals"
|
||||
|
|
83
docker/examples/arm64/README
Normal file
83
docker/examples/arm64/README
Normal file
|
@ -0,0 +1,83 @@
|
|||
PhotoPrism for Raspberry Pi (64bit)
|
||||
===================================
|
||||
|
||||
Download https://dl.photoprism.org/docker/arm64/docker-compose.yml example config
|
||||
(right click and *Save Link As...* or use `wget`) to a folder of your choice,
|
||||
change the configuration as needed, and run `docker-compose up` to start PhotoPrism:
|
||||
|
||||
wget https://dl.photoprism.org/docker/arm64/docker-compose.yml
|
||||
sudo docker-compose up -d
|
||||
|
||||
Please always change PHOTOPRISM_ADMIN_PASSWORD so that PhotoPrism starts with a secure initial password.
|
||||
Never use "photoprism", or other easy-to-guess passwords, on a public server.
|
||||
A minimum length of 4 characters is required.
|
||||
|
||||
For details, see:
|
||||
- https://docs.photoprism.org/getting-started/docker-compose/
|
||||
- https://docs.photoprism.org/getting-started/config-options/
|
||||
|
||||
All commands may have to be prefixed with "sudo" when not running as root.
|
||||
Note that this will change the home directory "~" to "/root" in your configuration.
|
||||
|
||||
Our repository on Docker Hub:
|
||||
- https://hub.docker.com/r/photoprism/photoprism-arm64
|
||||
|
||||
## Docker Compose Command Reference ##
|
||||
|
||||
The help command shows a complete list of commands and config options.
|
||||
Use the --help flag to see a detailed command info like
|
||||
"docker-compose exec photoprism photoprism backup --help".
|
||||
|
||||
| Action | Command |
|
||||
|------------------|---------------------------------------------------------|
|
||||
| Start | docker-compose up -d |
|
||||
| Stop | docker-compose stop |
|
||||
| Update | docker-compose pull |
|
||||
| View Logs | docker-compose logs --tail=25 -f |
|
||||
| Open Terminal | docker-compose exec photoprism bash |
|
||||
| Show Help | docker-compose exec photoprism photoprism help |
|
||||
| Show Config | docker-compose exec photoprism photoprism config |
|
||||
| Reset Database | docker-compose exec photoprism photoprism reset |
|
||||
| Backup Database | docker-compose exec photoprism photoprism backup -a -i |
|
||||
| Restore Database | docker-compose exec photoprism photoprism restore -a -i |
|
||||
| Index Library | docker-compose exec photoprism photoprism index |
|
||||
| Complete Rescan | docker-compose exec photoprism photoprism index --all |
|
||||
| Import Files | docker-compose exec photoprism photoprism import |
|
||||
|
||||
|
||||
Note: "photoprism index --all" will re-index all originals, including already indexed and unchanged files.
|
||||
This may be necessary after upgrading, especially to new major versions.
|
||||
|
||||
## System Requirements ##
|
||||
|
||||
You need to boot your Raspberry Pi 3 / 4 with the parameter "arm_64bit=1" in config.txt in order to use this image.
|
||||
Alternatively, you may run the image on UbuntuDockerPi (https://github.com/guysoft/UbuntuDockerPi).
|
||||
It's a 64bit Ubuntu Server with Docker pre-installed.
|
||||
|
||||
Indexing large photo and video collections significantly benefits from fast, local SSD storage and enough memory for caching.
|
||||
|
||||
## Reducing Server Load ##
|
||||
|
||||
If you're running out of memory - or other system resources - while indexing, please limit the
|
||||
number of workers by setting PHOTOPRISM_WORKERS to a value less than the number of logical CPU cores
|
||||
in docker-compose.yml.
|
||||
|
||||
Also make sure your server has swap configured so that indexing doesn't cause restarts when
|
||||
there are memory usage spikes.
|
||||
As a measure of last resort, you may additionally disable image classification using TensorFlow.
|
||||
|
||||
To avoid permission issues, docker-compose.yml should include the following security options:
|
||||
|
||||
photoprism:
|
||||
security_opt:
|
||||
- seccomp:unconfined
|
||||
- apparmor:unconfined
|
||||
|
||||
## More Information ##
|
||||
|
||||
- https://docs.photoprism.org/getting-started/raspberry-pi/
|
||||
- https://docs.photoprism.org/getting-started/faq/#why-is-photoprism-getting-stuck-in-a-restart-loop
|
||||
- https://www.raspberrypi.org/documentation/installation/installing-images/README.md
|
||||
|
||||
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
PhotoPrism for Raspberry Pi (64bit)
|
||||
===================================
|
||||
|
||||
Big thank you to [Guy Sheffer](https://github.com/guysoft) for
|
||||
[building](https://github.com/photoprism/photoprism/issues/109) this!
|
||||
|
||||
Download our [docker-compose.yml](https://dl.photoprism.org/docker/arm64/docker-compose.yml) file
|
||||
(right click and *Save Link As...* or use `wget`) to a folder of your choice,
|
||||
change the configuration as needed, and run `docker-compose up` to start PhotoPrism:
|
||||
|
||||
```
|
||||
wget https://dl.photoprism.org/docker/arm64/docker-compose.yml
|
||||
sudo docker-compose up -d
|
||||
```
|
||||
|
||||
Please always change PHOTOPRISM_ADMIN_PASSWORD so that PhotoPrism starts with a secure initial password.
|
||||
Never use "photoprism", or other easy-to-guess passwords, on a public server.
|
||||
|
||||
See [Setup Using Docker Compose](https://docs.photoprism.org/getting-started/docker-compose/)
|
||||
and [Config Options](https://docs.photoprism.org/getting-started/config-options/) for details.
|
||||
|
||||
All commands may have to be prefixed with `sudo` when not running as root.
|
||||
Note that this will change the home directory `~` to `/root` in your configuration.
|
||||
|
||||
Our repository on Docker Hub: https://hub.docker.com/r/photoprism/photoprism-arm64
|
||||
|
||||
## Docker Compose Command Reference ##
|
||||
|
||||
| Action | Command |
|
||||
|------------------|-----------------------------------------------------------|
|
||||
| Start | `docker-compose up -d` |
|
||||
| Stop | `docker-compose stop` |
|
||||
| Update | `docker-compose pull` |
|
||||
| View Logs | `docker-compose logs --tail=25 -f` |
|
||||
| Open Terminal | `docker-compose exec photoprism bash` |
|
||||
| Show Help | `docker-compose exec photoprism photoprism help` |
|
||||
| Show Config | `docker-compose exec photoprism photoprism config` |
|
||||
| Reset Database | `docker-compose exec photoprism photoprism reset` |
|
||||
| Backup Database | `docker-compose exec photoprism photoprism backup -a -i` |
|
||||
| Restore Database | `docker-compose exec photoprism photoprism restore -a -i` |
|
||||
| Index Library | `docker-compose exec photoprism photoprism index` |
|
||||
| Complete Rescan | `docker-compose exec photoprism photoprism index --all` |
|
||||
| Import Files | `docker-compose exec photoprism photoprism import` |
|
||||
|
||||
!!! info "Complete Rescan"
|
||||
`photoprism index --all` will re-index all originals, including already indexed and unchanged files. This may be
|
||||
necessary after upgrading, especially to new major versions.
|
||||
|
||||
## System Requirements ##
|
||||
|
||||
You need to boot your Raspberry Pi 3 / 4 with the parameter `arm_64bit=1` in `config.txt` in order to use this image.
|
||||
Alternatively, you may run the image on [UbuntuDockerPi](https://github.com/guysoft/UbuntuDockerPi).
|
||||
It's a 64bit Ubuntu Server with Docker pre-installed.
|
||||
|
||||
Indexing large photo and video collections significantly benefits from fast, local SSD storage and enough memory for caching.
|
||||
|
||||
!!! tip "Reducing Server Load"
|
||||
If you're running out of memory - or other system resources - while indexing, please limit the
|
||||
[number of workers](https://docs.photoprism.org/getting-started/config-options/) by setting
|
||||
`PHOTOPRISM_WORKERS` to a value less than the number of logical CPU cores in `docker-compose.yml`.
|
||||
Also make sure your server has [swap](https://opensource.com/article/18/9/swap-space-linux-systems)
|
||||
configured so that indexing doesn't cause restarts when there are memory usage spikes.
|
||||
As a measure of last resort, you may additionally disable image classification using TensorFlow.
|
||||
|
||||
To avoid permission issues, docker-compose.yml should include the following security options:
|
||||
|
||||
```
|
||||
photoprism:
|
||||
security_opt:
|
||||
- seccomp:unconfined
|
||||
- apparmor:unconfined
|
||||
```
|
||||
|
||||
## Additional Documentation ##
|
||||
|
||||
- https://docs.photoprism.org/getting-started/raspberry-pi/
|
||||
- https://docs.photoprism.org/getting-started/faq/#why-is-photoprism-getting-stuck-in-a-restart-loop
|
||||
- https://www.raspberrypi.org/documentation/installation/installing-images/README.md
|
||||
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ services:
|
|||
- 2342:2342 # [local port]:[container port]
|
||||
environment:
|
||||
PHOTOPRISM_HTTP_PORT: 2342
|
||||
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # PLEASE CHANGE: This is your initial admin password
|
||||
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # PLEASE CHANGE: Your initial admin password (min 4 characters)
|
||||
PHOTOPRISM_WORKERS: 2 # Limit the number of indexing workers to reduce system load
|
||||
PHOTOPRISM_DEBUG: "false" # Run in debug mode (shows additional log messages)
|
||||
PHOTOPRISM_PUBLIC: "false" # No authentication required (disables password protection)
|
||||
|
|
|
@ -43,7 +43,7 @@ services:
|
|||
- 2342:2342 # [local port]:[container port]
|
||||
environment:
|
||||
PHOTOPRISM_HTTP_PORT: 2342
|
||||
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # PLEASE CHANGE: This is your initial admin password
|
||||
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # PLEASE CHANGE: Your initial admin password (min 4 characters)
|
||||
PHOTOPRISM_DEBUG: "false" # Run in debug mode (shows additional log messages)
|
||||
PHOTOPRISM_PUBLIC: "false" # No authentication required (disables password protection)
|
||||
PHOTOPRISM_READONLY: "false" # Don't modify originals directory (reduced functionality)
|
||||
|
|
|
@ -42,7 +42,7 @@ services:
|
|||
- 2342:2342 # [local port]:[container port]
|
||||
environment:
|
||||
PHOTOPRISM_HTTP_PORT: 2342
|
||||
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # PLEASE CHANGE: This is your initial admin password
|
||||
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # PLEASE CHANGE: Your initial admin password (min 4 characters)
|
||||
PHOTOPRISM_DEBUG: "false" # Run in debug mode (shows additional log messages)
|
||||
PHOTOPRISM_PUBLIC: "false" # No authentication required (disables password protection)
|
||||
PHOTOPRISM_READONLY: "false" # Don't modify originals directory (reduced functionality)
|
||||
|
|
|
@ -43,7 +43,7 @@ services:
|
|||
- 2342:2342 # [local port]:[container port]
|
||||
environment:
|
||||
PHOTOPRISM_HTTP_PORT: 2342
|
||||
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # PLEASE CHANGE: This is your initial admin password
|
||||
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # PLEASE CHANGE: Your initial admin password (min 4 characters)
|
||||
PHOTOPRISM_DEBUG: "false" # Run in debug mode (shows additional log messages)
|
||||
PHOTOPRISM_PUBLIC: "false" # No authentication required (disables password protection)
|
||||
PHOTOPRISM_READONLY: "false" # Don't modify originals directory (reduced functionality)
|
||||
|
|
|
@ -44,7 +44,7 @@ services:
|
|||
- 2342:2342 # [local port]:[container port]
|
||||
environment:
|
||||
PHOTOPRISM_HTTP_PORT: 2342
|
||||
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # PLEASE CHANGE: This is your initial admin password
|
||||
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # PLEASE CHANGE: Your initial admin password (min 4 characters)
|
||||
PHOTOPRISM_DEBUG: "false" # Run in debug mode, shows additional log messages
|
||||
PHOTOPRISM_PUBLIC: "false" # No authentication required, disables password protection
|
||||
PHOTOPRISM_READONLY: "false" # Don't modify originals folder; disables import, upload, and delete
|
||||
|
|
|
@ -34,7 +34,7 @@ var GlobalFlags = []cli.Flag{
|
|||
},
|
||||
cli.StringFlag{
|
||||
Name: "admin-password",
|
||||
Usage: "initial admin `PASSWORD`, please use a secure default",
|
||||
Usage: "initial admin `PASSWORD`, min 4 characters",
|
||||
EnvVar: "PHOTOPRISM_ADMIN_PASSWORD",
|
||||
},
|
||||
cli.StringFlag{
|
||||
|
|
|
@ -230,8 +230,8 @@ func (m *User) SetPassword(password string) error {
|
|||
return fmt.Errorf("only registered users can change their password")
|
||||
}
|
||||
|
||||
if len(password) < 6 {
|
||||
return fmt.Errorf("new password for %s must be at least 6 characters", txt.Quote(m.UserName))
|
||||
if len(password) < 4 {
|
||||
return fmt.Errorf("new password for %s must be at least 4 characters", txt.Quote(m.UserName))
|
||||
}
|
||||
|
||||
pw := NewPassword(m.UserUID, password)
|
||||
|
|
Loading…
Add table
Reference in a new issue