mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 17:05:32 +00:00
Improved README.md [ci skip]
This commit is contained in:
parent
9c3fdcae32
commit
0768ace783
107
README.md
107
README.md
|
@ -8,62 +8,71 @@
|
|||
|
||||
- The base image configures Seafile with the Seafile team's recommended optimal defaults.
|
||||
|
||||
If you are not familiar with docker commands, please refer to [docker documentation](https://docs.docker.com/engine/reference/commandline/cli/).
|
||||
|
||||
### Getting Started
|
||||
|
||||
Download seafile image, and run the image.
|
||||
To run the seafile server container:
|
||||
|
||||
```
|
||||
docker run -d --name seafile-server -v /opt/seafile-data:/shared -p 80:80 seafileltd/seafile:6.2.1
|
||||
```sh
|
||||
docker run -d --name seafile \
|
||||
-e SEAFILE_SERVER_HOSTNAME=seafile.example.com \
|
||||
-v /opt/seafile-data:/shared \
|
||||
-p 80:80 \
|
||||
seafileltd/seafile:latest
|
||||
```
|
||||
|
||||
Now visit `http://hostname` or `https://hostname` to open Seafile Web UI.
|
||||
Wait for a few minutes for the first time initialization, then visit `http://seafile.example.com` to open Seafile Web UI.
|
||||
|
||||
If you are not familiar with docker commands, refer to [docker documentation](https://docs.docker.com/engine/reference/commandline/cli/).
|
||||
### More configuration Options
|
||||
|
||||
### More configuration option
|
||||
|
||||
#### Custom admin username and password
|
||||
|
||||
The default account is `me@example.com` and the password is `asecret`. It will be created when the container is first run.
|
||||
The default values can also be changed by setting the container's environment variables
|
||||
#### Custom Admin Username and Password
|
||||
|
||||
The default admin account is `me@example.com` and the password is `asecret`. You can use a different password by setting the container's environment variables:
|
||||
e.g.
|
||||
|
||||
docker run -d --name seafile-server -e "SEAFILE_ADMIN_EMAIL=me@example.com" -e "SEAFILE_ADMIN_PASSWORD=asecret" -v /opt/seafile-data:/shared -p 80:80 seafileltd/seafile:6.2.1
|
||||
```sh
|
||||
docker run -d --name seafile \
|
||||
-e SEAFILE_SERVER_HOSTNAME=seafile.example.com \
|
||||
-e SEAFILE_ADMIN_EMAIL=me@example.com \
|
||||
-e SEAFILE_ADMIN_PASSWORD=a_very_secret_password \
|
||||
-v /opt/seafile-data:/shared \
|
||||
-p 80:80 \
|
||||
seafileltd/seafile:latest
|
||||
```
|
||||
|
||||
If you forget the admin password, you can add a new admin account and then go to the sysadmin panel to reset user password.
|
||||
|
||||
#### Domain
|
||||
|
||||
The default value is `seafile.example.com`, you can set environ to docker container.
|
||||
|
||||
e.g.
|
||||
|
||||
docker run -d --name seafile-server -e "SEAFILE_SERVER_HOSTNAME=seafile.example.com" -v /opt/seafile-data:/shared -p 80:80 seafileltd/seafile:6.2.1
|
||||
|
||||
And then nginx will update up config.
|
||||
|
||||
#### Let's encrypt SSL certificate
|
||||
|
||||
If you set `SEAFILE_SERVER_LETSENCRYPT` to `true`, the bootstrap script would request a letsencrypt-signed SSL certificate for you.
|
||||
If you set `SEAFILE_SERVER_LETSENCRYPT` to `true`, the container would request a letsencrypt-signed SSL certificate for you automatically.
|
||||
|
||||
e.g.
|
||||
|
||||
docker run -d --name seafile-server -e "SEAFILE_SERVER_LETSENCRYPT=true" -v /opt/seafile-data:/shared -p 80:80 -p 443:443 seafileltd/seafile:6.2.1
|
||||
```
|
||||
docker run -d --name seafile \
|
||||
-e SEAFILE_SERVER_LETSENCRYPT=true \
|
||||
-e SEAFILE_SERVER_HOSTNAME=seafile.example.com \
|
||||
-e SEAFILE_ADMIN_EMAIL=me@example.com \
|
||||
-e SEAFILE_ADMIN_PASSWORD=a_very_secret_password \
|
||||
-v /opt/seafile-data:/shared \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
seafileltd/seafile:latest
|
||||
```
|
||||
|
||||
If you want to use your own SSL certificate:
|
||||
- create a folder 'shared/ssl', and put your certificate and private key under the ssl directory.
|
||||
- Assume your site name is "seafile.example.com", then your certificate must have the name "seafile.example.com.crt", and the private key must have the name "seafile.example.com.key".
|
||||
- create a folder `/opt/seafile-data/ssl`, and put your certificate and private key under the ssl directory.
|
||||
- Assume your site name is `seafile.example.com`, then your certificate must have the name `seafile.example.com.crt`, and the private key must have the name `seafile.example.com.key`.
|
||||
|
||||
#### Modify configurations
|
||||
#### Modify Seafile Server Configurations
|
||||
|
||||
The config files are under `shared/seafile/conf`. You can modify the configurations according to [Seafile manual](https://manual.seafile.com/)
|
||||
|
||||
After modification, run the new docker container:
|
||||
After modification, you need to restart the container:
|
||||
|
||||
```
|
||||
docker rm -fseafile-server
|
||||
docker run -d --name seafile-server -v /root/seafile:/shared -p 80:80 seafileltd/seafile:6.2.1
|
||||
docker restart seafile
|
||||
```
|
||||
|
||||
#### Find logs
|
||||
|
@ -74,10 +83,10 @@ The system logs are under `shared/logs/var-log`.
|
|||
|
||||
#### Add a new Admin
|
||||
|
||||
Enter the command below.
|
||||
Ensure the container is running, then enter this command:
|
||||
|
||||
```
|
||||
docker exec -it seafile-server /opt/seafile/seafile-server-latest/reset-admin.sh
|
||||
docker exec -it seafile /opt/seafile/seafile-server-latest/reset-admin.sh
|
||||
```
|
||||
|
||||
Enter the username and password according to the prompts. You now have a new admin account.
|
||||
|
@ -98,21 +107,31 @@ Placeholder spot for shared volumes. You may elect to store certain persistent i
|
|||
|
||||
|
||||
### Upgrading Seafile Server
|
||||
If you are one of the users who use the launcher update. You can refer to [upgrade from old format](https://github.com/haiwen/seafile-docker/upgrade_from_old_format.md)
|
||||
|
||||
ensure same version of the repo, and run start command
|
||||
TO upgrade to latest version of seafile server:
|
||||
|
||||
docker run -d --name seafile-server -v ${data_path}:/shared -p 80:80 seafileltd/seafile:6.2.1
|
||||
which would keep your seafile server up to date.
|
||||
```sh
|
||||
docker pull seafileltd/seafile:latest
|
||||
docker rm -f seafile
|
||||
docker run -d --name seafile \
|
||||
-e SEAFILE_SERVER_LETSENCRYPT=true \
|
||||
-e SEAFILE_SERVER_HOSTNAME=seafile.example.com \
|
||||
-e SEAFILE_ADMIN_EMAIL=me@example.com \
|
||||
-e SEAFILE_ADMIN_PASSWORD=a_very_secret_password \
|
||||
-v /opt/seafile-data:/shared \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
seafileltd/seafile:latest
|
||||
```
|
||||
|
||||
If you are one of the early users who use the `launcher` script, you should refer to [upgrade from old format](https://github.com/haiwen/seafile-docker/upgrade_from_old_format.md) document.
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
You can run the command as "docker logs" or "docker exec" to find errors.
|
||||
You can run docker commands like "docker logs" or "docker exec" to find errors.
|
||||
|
||||
### Special Thanks
|
||||
|
||||
Lots of the design of this repo is borrowed from the excellent [discourse-docker](https://github.com/discourse/discourse_docker) project. Thanks for their insipiration!
|
||||
|
||||
License
|
||||
===
|
||||
Apache
|
||||
```sh
|
||||
docker logs -f seafile
|
||||
# or
|
||||
docker exec -it seafile bash
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue