use docker compose up

This commit is contained in:
skywalker 2023-10-13 17:17:55 +08:00
parent e2d56bfa2c
commit 82bb999450
16 changed files with 45 additions and 92 deletions

View File

@ -1,4 +1,3 @@
version: '3.0'
services:
office-preview:
image: seafileltd/office-preview:latest

View File

@ -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
@ -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.

View File

@ -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:
```
@ -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
```
@ -80,7 +66,6 @@ $ vim docker-compose.yml
```
```
version: '2.0'
services:
seafile:
image: docker.seadrive.org/seafileltd/seafile-pro-mc:latest
@ -102,7 +87,7 @@ Start the seafile docker container
```
$ cd /opt/seafile
$ docker-compose up -d
$ docker compose up -d
```
@ -220,7 +205,6 @@ $ vim docker-compose.yml
```
```
version: '2.0'
services:
seafile:
image: docker.seadrive.org/seafileltd/seafile-pro-mc:latest
@ -242,7 +226,7 @@ Start the seafile docker container
```
$ cd /opt/seafile
$ docker-compose up -d
$ docker compose up -d
```

View File

@ -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:
@ -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
```
@ -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.
@ -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
```
@ -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.
@ -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
@ -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.

View File

@ -1,4 +1,3 @@
version: '2.0'
services:
db:
image: mariadb:10.11

View File

@ -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
@ -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
@ -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
```

View File

@ -1,4 +1,3 @@
version: '2.0'
services:
db:
image: mariadb:10.11

View File

@ -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.

View File

@ -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.

View File

@ -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:
@ -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.
@ -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
@ -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`.
@ -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.
@ -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
@ -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?
@ -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.

View File

@ -11,7 +11,7 @@
### Stop the Seafile CE
```sh
docker-compose down
docker compose down
```
@ -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
```

View File

@ -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
```

View File

@ -1,4 +1,3 @@
version: "2.0"
services:
sdoc-server:

View File

@ -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.
@ -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
```

View File

@ -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

View File

@ -1,6 +1,6 @@
# Upgrade Seafile Docker
For maintenance upgrade, like from version 10.0.1 to version 10.0.4, just download the new image, stop the old docker container, modify the Seafile image version in docker-compose.yml to the new version, then start with docker-compose up.
For maintenance upgrade, like from version 10.0.1 to version 10.0.4, just download the new image, stop the old docker container, modify the Seafile image version in docker-compose.yml to the new version, then start with docker compose up.
For major version upgrade, like from 10.0 to 11.0, see instructions below.
@ -13,11 +13,11 @@ Download the new image, stop the old docker container, modify the Seafile image
Migrate your configuration for LDAP and OAuth according to <https://manual.seafile.com/upgrade/upgrade_notes_for_11.0.x>
Start with docker-compose up.
Start with docker compose up.
## Upgrade from 9.0 to 10.0
Download the new image, stop the old docker container, modify the Seafile image version in docker-compose.yml to the new version, then start with docker-compose up.
Download the new image, stop the old docker container, modify the Seafile image version in docker-compose.yml to the new version, then start with docker compose up.
If you are using pro edition with ElasticSearch, SAML SSO and storage backend features, follow the upgrading manual on how to update the configuration for these features: <https://manual.seafile.com/upgrade/upgrade_notes_for_10.0.x>
@ -25,7 +25,7 @@ If you want to use the new notification server and rate control (pro edition onl
## Upgrade from 8.0 to 9.0
Just download the new image, stop the old docker container, modify the Seafile image version in docker-compose.yml to the new version, then start with docker-compose up.
Just download the new image, stop the old docker container, modify the Seafile image version in docker-compose.yml to the new version, then start with docker compose up.
### Let's encrypt SSL certificate
@ -42,8 +42,8 @@ mv /opt/seafile/shared/nginx/conf/seafile.nginx.conf /opt/seafile/shared/nginx/c
Starting the new container will automatically apply a certificate.
```shell
docker-compose down
docker-compose up -d
docker compose down
docker compose up -d
```
Please wait a moment for the certificate to be applied, then you can modify the new seafile.nginx.conf as you want. Execute the following command to make the nginx configuration take effect.
@ -56,9 +56,9 @@ A cron job inside the container will automatically renew the certificate.
## Upgrade from 7.1 to 8.0
Just download the new image, stop the old docker container, modify the Seafile image version in docker-compose.yml to the new version, then start with docker-compose up.
Just download the new image, stop the old docker container, modify the Seafile image version in docker-compose.yml to the new version, then start with docker compose up.
## Upgrade from 7.0 to 7.1
Just download the new image, stop the old docker container, modify the Seafile image version in docker-compose.yml to the new version, then start with docker-compose up.
Just download the new image, stop the old docker container, modify the Seafile image version in docker-compose.yml to the new version, then start with docker compose up.