Add docker documentation

This commit is contained in:
2026-03-05 15:33:10 +01:00
parent 5b75983161
commit 802fa9cc09

View File

@@ -2,6 +2,28 @@
Bibliomane is a free server whose main purpose is to track your reading. It is currently in development, and not in a state where it can be used in production. Bibliomane is a free server whose main purpose is to track your reading. It is currently in development, and not in a state where it can be used in production.
## Docker
The docker image is currently not published. So you need to build it :
`docker build -t bibliomane .`
Then you can test it by running it directly, redirecting the default port:
`docker run -p8080:8080 bibliomane`
You can store image folder, config file and sqlite file in a bind folder to have a persistent instance. For example, if you created a folder `bibliomane_data`:
`docker run -p8080:8080 --mount type=bind,src=/path/to/bibliomane_data,dst=/opt/bibliomane bibliomane`
You can also change the image folder path in the container using `-i`. For example, if you have a folder `bibliomane_data/image`:
`docker run -p8080:8080 --mount type=bind,src=/path/to/bibliomane_data,dst=/opt/bibliomane bibliomane -i /opt/bibliomane/image`
Or with a volume, for example if you created a volume named `bibliomane_data`:
`docker run -p8080:8080 --volume bibliomane_data:/opt/bibliomane bibliomane`
## Generate new accounts on startup ## Generate new accounts on startup
`--add-user` or `-a` can be used to create an account on startup. It requires a string following htpasswd format `[username]:[bcrypt hashed password]`. `--add-user` or `-a` can be used to create an account on startup. It requires a string following htpasswd format `[username]:[bcrypt hashed password]`.