opt: some structures

This commit is contained in:
Junxiang Huang 2024-10-30 10:33:47 +08:00
parent 87ee7d6f16
commit 6037fb513a
4 changed files with 73 additions and 63 deletions

View File

@ -15,6 +15,16 @@ cd seafile-server-latest
```
!!! tip
If your Seafile server is deployed by [Docker](../setup/setup_ce_by_docker.md), you have to run the above command **in the container**:
```sh
docker exec -it seafile bash
# after entering the container
cd /scripts
./seaf-fsck.sh [--repair|-r] [--export|-E export_path] [repo_id_1 [repo_id_2 ...]]
```
There are three modes of operation for seaf-fsck:
1. checking integrity of libraries.

View File

@ -1,7 +1,7 @@
# HTTPS and Caddy
!!! note
From Seafile 12.0, the HTTPS in deployment from Docker is handled by [***Caddy***](https://caddyserver.com/docs/). The default caddy image used of Seafile docker is [`lucaslorentz/caddy-docker-proxy:2.9`](https://github.com/lucaslorentz/caddy-docker-proxy).
From Seafile Docker 12.0, HTTPS will be handled by the [***Caddy***](https://caddyserver.com/docs/). The default caddy image used of Seafile docker is [`lucaslorentz/caddy-docker-proxy:2.9`](https://github.com/lucaslorentz/caddy-docker-proxy).
Caddy is a modern open source web server that mainly binds external traffic and internal services in [seafile docker](./overview.md). In addition to the advantages of traditional proxy components (e.g., *nginx*), Caddy also makes it easier for users to complete the acquisite and update of HTTPS certificates by providing simpler configurations.

View File

@ -2,72 +2,72 @@
You can use one of the following methods to start Seafile container on system bootup.
=== "`docker-compose.service`"
## Modify docker-compose.service
1. Add `docker-compose.service`
1. Add `docker-compose.service`
`vim /etc/systemd/system/docker-compose.service`
```
[Unit]
Description=Docker Compose Application Service
Requires=docker.service
After=docker.service
[Service]
Type=forking
RemainAfterExit=yes
WorkingDirectory=/opt/
ExecStart=/usr/bin/docker compose up -d
ExecStop=/usr/bin/docker compose down
TimeoutStartSec=0
[Install]
WantedBy=multi-user.target
```
!!! note
`WorkingDirectory` is the absolute path to the `seafile-server.yml` file directory.
2. Set the `docker-compose.service` file to 644 permissions
```
chmod 644 /etc/systemd/system/docker-compose.service
```
3. Load autostart configuration
```
systemctl daemon-reload
systemctl enable docker-compose.service
```
=== "`xxx.yml`"
Add configuration `restart: unless-stopped` for each container in [components of Seafile docker](./overview.md). Take `seafile-server.yml` for example
`vim /etc/systemd/system/docker-compose.service`
```
services:
db:
image: mariadb:10.11
container_name: seafile-mysql-1
restart: unless-stopped
[Unit]
Description=Docker Compose Application Service
Requires=docker.service
After=docker.service
memcached:
image: memcached:1.6.18
container_name: seafile-memcached
restart: unless-stopped
[Service]
Type=forking
RemainAfterExit=yes
WorkingDirectory=/opt/
ExecStart=/usr/bin/docker compose up -d
ExecStop=/usr/bin/docker compose down
TimeoutStartSec=0
elasticsearch:
image: elasticsearch:8.6.2
container_name: seafile-elasticsearch
restart: unless-stopped
seafile:
image: docker.seadrive.org/seafileltd/seafile-pro-mc:12.0-latest
container_name: seafile
restart: unless-stopped
[Install]
WantedBy=multi-user.target
```
!!! tip
Add `restart: unless-stopped`, and the Seafile container will automatically start when Docker starts. If the Seafile container does not exist (execute docker compose down), the container will not start automatically.
!!! note
`WorkingDirectory` is the absolute path to the `seafile-server.yml` file directory.
2. Set the `docker-compose.service` file to 644 permissions
```
chmod 644 /etc/systemd/system/docker-compose.service
```
3. Load autostart configuration
```
systemctl daemon-reload
systemctl enable docker-compose.service
```
## Modify Docker files
Add configuration `restart: unless-stopped` for each container in [components of Seafile docker](./overview.md). Take `seafile-server.yml` for example
```
services:
db:
image: mariadb:10.11
container_name: seafile-mysql-1
restart: unless-stopped
memcached:
image: memcached:1.6.18
container_name: seafile-memcached
restart: unless-stopped
elasticsearch:
image: elasticsearch:8.6.2
container_name: seafile-elasticsearch
restart: unless-stopped
seafile:
image: docker.seadrive.org/seafileltd/seafile-pro-mc:12.0-latest
container_name: seafile
restart: unless-stopped
```
!!! tip
Add `restart: unless-stopped`, and the Seafile container will automatically start when Docker starts. If the Seafile container does not exist (execute docker compose down), the container will not start automatically.

View File

@ -18,7 +18,7 @@ Use the [official installation guide for your OS to install Docker](https://docs
### Download and modify `.env`
!!! tip "From Seafile Docker 12.0, we use `.env`, `seafile-server.yml` and `caddy.yml` files for configuration"
From Seafile Docker 12.0, we use `.env`, `seafile-server.yml` and `caddy.yml` files for configuration
```bash
mkdir /opt/seafile