Skip to content

Commit

Permalink
Merge pull request #220 from haiwen/docker-compose-up
Browse files Browse the repository at this point in the history
use docker compose up
  • Loading branch information
freeplant authored Oct 16, 2023
2 parents 3833d8e + 82bb999 commit 21c1705
Show file tree
Hide file tree
Showing 16 changed files with 45 additions and 92 deletions.
1 change: 0 additions & 1 deletion manual/deploy_pro/office-preview-yml/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.0'
services:
office-preview:
image: seafileltd/office-preview:latest
Expand Down
5 changes: 2 additions & 3 deletions manual/deploy_pro/office_documents_preview.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,13 @@ port = 6000

## Version 9.0.x or above

We use Docker to deploy LibreOffice as an example, so you need to install Docker and docker-compose on the server in advance (Docker installation is not introduced here). The office-preview service needs to be deployed on the same machine as the Seafile service.
We use Docker to deploy LibreOffice as an example, so you need to install Docker on the server in advance (Docker installation is not introduced here). The office-preview service needs to be deployed on the same machine as the Seafile service.

### Prepare `docker-compose.yml`

Download and change [docker-compose.yml](./office-preview-yml/docker-compose.yml).

```
version: '3.0'
services:
office-preview:
image: seafileltd/office-preview:latest
Expand All @@ -96,7 +95,7 @@ services:
### Start `seafile-office-preview` container

```
docker-compose up -d
docker compose up -d
```

Add `/opt/office-preview/shared/office_convertor_settings.py` manually.
Expand Down
20 changes: 2 additions & 18 deletions manual/docker/cluster/deploy_seafile_cluster_with_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ We assume you have already deployed memcache, MariaDB, ElasticSearch in separate

## Deployment preparation

Install docker-compose on each node

```
$ apt update && apt install docker-compose -y
```

Create the three databases ccnet_db, seafile_db, and seahub_db required by Seafile on MariaDB/MySQL, and authorize the \`seafile\` user to be able to access these three databases:

```
Expand Down Expand Up @@ -57,13 +50,6 @@ CREATE TABLE `avatar_uploaded` (

### Deploy seafile frontend nodes

Install docker-compose on the frontend node

```
$ apt update && apt install docker-compose -y
```

Create the mount directory

```
Expand All @@ -80,7 +66,6 @@ $ vim docker-compose.yml
```

```
version: '2.0'
services:
seafile:
image: docker.seadrive.org/seafileltd/seafile-pro-mc:latest
Expand All @@ -102,7 +87,7 @@ Start the seafile docker container

```
$ cd /opt/seafile
$ docker-compose up -d
$ docker compose up -d
```

Expand Down Expand Up @@ -220,7 +205,6 @@ $ vim docker-compose.yml
```

```
version: '2.0'
services:
seafile:
image: docker.seadrive.org/seafileltd/seafile-pro-mc:latest
Expand All @@ -242,7 +226,7 @@ Start the seafile docker container

```
$ cd /opt/seafile
$ docker-compose up -d
$ docker compose up -d
```

Expand Down
29 changes: 8 additions & 21 deletions manual/docker/deploy_seafile_with_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,6 @@

Use the [official installation guide for your OS to install Docker](https://docs.docker.com/engine/install/).

### Install docker-compose

Seafile docker image uses docker-compose. You should install the docker-compose command.

```bash
# for CentOS
yum install docker-compose -y

# for Ubuntu
apt-get install docker-compose -y

```

### Download and modify docker-compose.yml

Download [docker-compose.yml](https://manual.seafile.com/docker/docker-compose.yml) sample file to your host. Then modify the file according to your environment. The following fields are needed to be modified:
Expand All @@ -32,7 +19,7 @@ Download [docker-compose.yml](https://manual.seafile.com/docker/docker-compose.y
Start Seafile server with the following command

```bash
docker-compose up -d
docker compose up -d

```

Expand Down Expand Up @@ -96,7 +83,7 @@ In /scripts/ssl.sh (script in seafile container), `git clone git://` has to be r
Then restart the container:

```shell
docker-compose restart
docker compose restart
```

Since version 9.0.6, we use acme (not acme-tiny) to get certificate and fix this error.
Expand Down Expand Up @@ -124,7 +111,7 @@ The config files are under `shared/seafile/conf`. You can modify the configurati
After modification, you need to restart the container:

```bash
docker-compose restart
docker compose restart

```

Expand All @@ -133,7 +120,7 @@ docker-compose restart
To view Seafile docker logs, please use the following command

```shell
docker-compose logs -f
docker compose logs -f
```

The Seafile logs are under `shared/logs/seafile` in the docker, or `/opt/seafile-data/logs/seafile` in the server that run the docker.
Expand Down Expand Up @@ -276,8 +263,8 @@ useradd --home-dir /home/seafile --create-home --uid 8000 --gid 8000 --shell /bi
Restarting the container run Seafile use seafile user. (NOTE: Later when do maintenance, other scripts in docker also required to run as seafile user, e.g. `su seafile -c ./seaf-gc.sh`)

```sh
docker-compose down
docker-compose up -d
docker compose down
docker compose up -d
```

## FAQ
Expand Down Expand Up @@ -309,8 +296,8 @@ mv /opt/seafile/shared/nginx/conf/seafile.nginx.conf /opt/seafile/shared/nginx/c
Starting the new container will automatically apply a certificate.

```sh
docker-compose down
docker-compose up -d
docker compose down
docker compose up -d
```

You need to manually change http to https in other configuration files, SERVICE_URL and FILE_SERVER_ROOT in the system admin page also need to be modified.
Expand Down
1 change: 0 additions & 1 deletion manual/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '2.0'
services:
db:
image: mariadb:10.11
Expand Down
7 changes: 3 additions & 4 deletions manual/docker/non_docker_to_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ Modify the memcached configuration in `seahub_settings.py` to use the Docker ver
Download [docker-compose.yml](https://download.seafile.com/d/320e8adf90fa43ad8fee/files/?p=/docker/docker-compose.yml) to `/opt/seafile-data`. Comment out the db part as below:

```
version: '2.0'
services:
# db:
# image: mariadb:10.5
Expand Down Expand Up @@ -128,7 +127,7 @@ Start Seafile docker and check if everything is okay:

```
cd /opt/seafile-data
docker-compose up -d
docker compose up -d
```

## Security
Expand Down Expand Up @@ -168,8 +167,8 @@ ip a #to check whether the ip is present
service mysql restart
ss -tulpen | grep 3306 #to check whether the database listens on the correct IP
cd /opt/seafile-data/
docker-compose down
docker-compose up -d
docker compose down
docker compose up -d
## restart your applications
```
1 change: 0 additions & 1 deletion manual/docker/pro-edition/10.0/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '2.0'
services:
db:
image: mariadb:10.11
Expand Down
4 changes: 2 additions & 2 deletions manual/docker/pro-edition/deploy_clamav_with_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ threads = 2
## Restart docker container

```shell
docker-compose down
docker-compose up -d
docker compose down
docker compose up -d
```

Wait some minutes until Clamav finished initializing.
Expand Down
4 changes: 2 additions & 2 deletions manual/docker/pro-edition/deploy_onlyoffice_with_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ ONLYOFFICE_JWT_SECRET = 'your-secret-string'
## Restart docker container

```shell
docker-compose down
docker-compose up -d
docker compose down
docker compose up -d
```

Wait some minutes until OnlyOffice finished initializing.
Expand Down
32 changes: 10 additions & 22 deletions manual/docker/pro-edition/deploy_seafile_pro_with_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@ Seafile PE can be used without a paid license with up to three users. Licenses f

Use the [official installation guide for your OS to install Docker](https://docs.docker.com/engine/install/).

### Installing Docker Compose

Install the Docker Compose package:

```bash
# CentOS
yum install docker-compose -y

# Debian/Ubuntu
apt-get install docker-compose -y
```

### Downloading the Seafile Image

Log into Seafile's private repository and pull the Seafile image:
Expand Down Expand Up @@ -92,10 +80,10 @@ chmod 777 -R /opt/seafile-elasticsearch/data

### Starting the Docker Containers

Run docker-compose in detached mode:
Run docker compose in detached mode:

```bash
docker-compose up -d
docker compose up -d
```

NOTE: You must run the above command in the directory with the docker-compose.yml.
Expand All @@ -110,7 +98,7 @@ If you have a `seafile-license.txt` license file, simply put it in the volume of
Then restart the container:

```
docker-compose restart
docker compose restart
```

### Reviewing the Deployment
Expand Down Expand Up @@ -149,7 +137,7 @@ All Seafile config files are stored in `/opt/seafile-data/seafile/conf`. The ngi
Any modification of a configuration file requires a restart of Seafile to take effect:

```
docker-compose restart
docker compose restart
```

All Seafile log files are stored in `/opt/seafile-data/seafile/logs` whereas all other log files are in `/opt/seafile-data/logs/var-log`.
Expand Down Expand Up @@ -208,7 +196,7 @@ In /scripts/ssl.sh (script in seafile container), `git clone git://` has to be r
Then restart the container:

```shell
docker-compose restart
docker compose restart
```

Since version 9.0.6, we use acme (not acme-tiny) to get certificate and fix this error.
Expand Down Expand Up @@ -353,8 +341,8 @@ useradd --home-dir /home/seafile --create-home --uid 8000 --gid 8000 --shell /bi
Restarting the container run Seafile use seafile user. (NOTE: Later when do maintenance, other scripts in docker also required to run as seafile user, e.g. `su seafile -c ./seaf-gc.sh`)

```sh
docker-compose down
docker-compose up -d
docker compose down
docker compose up -d
```

## OnlyOffice with Docker
Expand Down Expand Up @@ -426,7 +414,7 @@ A: Remove the directories /opt/seafile, /opt/seafile-data, /opt/seafile-elastics

Q: Something goes wrong during the start of the containers. How can I find out more?

A: You can view the docker logs using this command: `docker-compose logs -f`.
A: You can view the docker logs using this command: `docker compose logs -f`.

Q: I forgot the admin password. How do I create a new admin account?

Expand All @@ -452,8 +440,8 @@ mv /opt/seafile/shared/nginx/conf/seafile.nginx.conf /opt/seafile/shared/nginx/c
Starting the new container will automatically apply a certificate.

```sh
docker-compose down
docker-compose up -d
docker compose down
docker compose up -d
```

You need to manually change http to https in other configuration files, SERVICE_URL and FILE_SERVER_ROOT in the system admin page also need to be modified.
Expand Down
4 changes: 2 additions & 2 deletions manual/docker/pro-edition/migrate_ce_to_pro_with_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
### Stop the Seafile CE

```sh
docker-compose down
docker compose down

```

Expand All @@ -37,7 +37,7 @@ The Seafile Pro container needs to be running during the migration process, whic
Run the following command to run the Seafile-Pro container:

```sh
docker-compose up
docker compose up

```

Expand Down
2 changes: 1 addition & 1 deletion manual/extension/fuse.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Add the following content
Start Seafile server and enter the container
```bash
docker-compose up -d
docker compose up -d

docker exec -it seafile bash
```
Expand Down
1 change: 0 additions & 1 deletion manual/extra_setup/sdoc/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "2.0"
services:

sdoc-server:
Expand Down
6 changes: 3 additions & 3 deletions manual/extra_setup/setup_seadoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Then follow the section: Start SeaDoc.
Start SeaDoc server with the following command
```sh
docker-compose up -d
docker compose up -d
```
Wait for a few minutes for the first time initialization. Open `sdoc-server-path/sdoc-server/conf/sdoc_server_config.json`, and record `private_key` for modifying Seafile configuration file.
Expand Down Expand Up @@ -272,7 +272,7 @@ To upgrade to latest version of SeaDoc server:
```sh
docker pull seafileltd/sdoc-server:latest
docker-compose down
docker-compose up -d
docker compose down
docker compose up -d
```
4 changes: 2 additions & 2 deletions manual/upgrade/upgrade_a_cluster_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ Seafile adds new features in major and minor versions. It is likely that some da

In general, to upgrade a cluster, you need:

1. Download the new image, stop the old docker container, modify the Seafile image version in docker-compose.yml to the new version. Start with docker-compose up.
1. Download the new image, stop the old docker container, modify the Seafile image version in docker-compose.yml to the new version. Start with docker compose up.
2. Run the upgrade script in container (for example, /opt/seafile/seafile-server-latest/upgrade/upgrade_10_0_11_0.sh) in one frontend node
3. Update configuration files at each node according to the documentation for each version
4. Delete old search index in the backend node if needed

## Maintanence upgrade

Maintanence upgrade only needs to download the new image, stop the old docker container, modify the Seafile image version in docker-compose.yml to the new version. Start with docker-compose up.
Maintanence upgrade only needs to download the new image, stop the old docker container, modify the Seafile image version in docker-compose.yml to the new version. Start with docker compose up.

## Upgrade from 10.0 to 11.0

Expand Down
Loading

0 comments on commit 21c1705

Please sign in to comment.