mirror of
https://github.com/nextcloud/docker.git
synced 2024-11-17 18:46:43 +01:00
Minor readme updates to match the changes for the compose v2 syntax.
Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com>
This commit is contained in:
parent
6dc29f2a72
commit
f4d89ecb29
1 changed files with 7 additions and 7 deletions
14
README.md
14
README.md
|
@ -283,7 +283,7 @@ Check the [Nexcloud documentation](https://docs.nextcloud.com/server/latest/admi
|
||||||
Keep in mind that once set, removing these environment variables won't remove these values from the configuration file, due to how Nextcloud merges configuration files together.
|
Keep in mind that once set, removing these environment variables won't remove these values from the configuration file, due to how Nextcloud merges configuration files together.
|
||||||
|
|
||||||
# Running this image with docker compose
|
# Running this image with docker compose
|
||||||
The easiest way to get a fully featured and functional setup is using a `docker compose` file. There are too many different possibilities to setup your system, so here are only some examples of what you have to look for.
|
The easiest way to get a fully featured and functional setup is using a docker `compose.yaml` file. There are too many different possibilities to setup your system, so here are only some examples of what you have to look for.
|
||||||
|
|
||||||
At first, make sure you have chosen the right base image (fpm or apache) and added features you wanted (see below). In every case, you would want to add a database container and docker volumes to get easy access to your persistent data. When you want to have your server reachable from the internet, adding HTTPS-encryption is mandatory! See below for more information.
|
At first, make sure you have chosen the right base image (fpm or apache) and added features you wanted (see below). In every case, you would want to add a database container and docker volumes to get easy access to your persistent data. When you want to have your server reachable from the internet, adding HTTPS-encryption is mandatory! See below for more information.
|
||||||
|
|
||||||
|
@ -344,7 +344,7 @@ volumes:
|
||||||
Then run `docker compose up -d`, now you can access Nextcloud at http://localhost:8080/ from your host system.
|
Then run `docker compose up -d`, now you can access Nextcloud at http://localhost:8080/ from your host system.
|
||||||
|
|
||||||
## Base version - FPM
|
## Base version - FPM
|
||||||
When using the FPM image, you need another container that acts as web server on port 80 and proxies the requests to the Nextcloud container. In this example a simple nginx container is combined with the Nextcloud-fpm image and a MariaDB database container. The data is stored in docker volumes. The nginx container also needs access to static files from your Nextcloud installation. It gets access to all the volumes mounted to Nextcloud via the `volumes_from` option. The configuration for nginx is stored in the configuration file `nginx.conf`, that is mounted into the container. An example can be found in the examples section [here](https://github.com/nextcloud/docker/tree/master/.examples).
|
When using the FPM image, you need another container that acts as web server on port 80 and proxies the requests to the Nextcloud container. In this example a simple nginx container is combined with the Nextcloud-fpm image and a MariaDB database container. The data is stored in docker volumes. The nginx container also needs access to static files from your Nextcloud installation. It gets access to all the volumes mounted to Nextcloud via the `volumes` option. The configuration for nginx is stored in the configuration file `nginx.conf`, that is mounted into the container. An example can be found in the examples section [here](https://github.com/nextcloud/docker/tree/master/.examples).
|
||||||
|
|
||||||
> [!WARNING]
|
> [!WARNING]
|
||||||
> This setup provides **no ssl encryption** and is intended to run behind a proxy.
|
> This setup provides **no ssl encryption** and is intended to run behind a proxy.
|
||||||
|
@ -531,7 +531,7 @@ RUN ...
|
||||||
```
|
```
|
||||||
The [examples folder](https://github.com/nextcloud/docker/blob/master/.examples) gives a few examples on how to add certain functionalities, like including the cron job, smb-support or imap-authentication.
|
The [examples folder](https://github.com/nextcloud/docker/blob/master/.examples) gives a few examples on how to add certain functionalities, like including the cron job, smb-support or imap-authentication.
|
||||||
|
|
||||||
If you use your own Dockerfile, you need to configure your docker compose file accordingly. Switch out the `image` option with `build`. You have to specify the path to your Dockerfile. (in the example it's in the same directory next to the docker compose file)
|
If you use your own Dockerfile, you need to configure your docker compose file accordingly. Switch out the `image` option with `build`. You have to specify the path to your Dockerfile. (in the example it's in the same directory next to the docker `compose.yaml` file)
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
app:
|
app:
|
||||||
|
@ -576,8 +576,8 @@ The `--pull` option tells docker to look for new versions of the base image. The
|
||||||
# Migrating an existing installation
|
# Migrating an existing installation
|
||||||
You're already using Nextcloud and want to switch to docker? Great! Here are some things to look out for:
|
You're already using Nextcloud and want to switch to docker? Great! Here are some things to look out for:
|
||||||
|
|
||||||
1. Define your whole Nextcloud infrastructure in a `docker compose` file and run it with `docker compose up -d` to get the base installation, volumes and database. Work from there.
|
1. Define your whole Nextcloud infrastructure in a docker `compose.yaml` file and run it with `docker compose up -d` to get the base installation, volumes and database. Work from there.
|
||||||
2. Restore your database from a mysqldump (db is the name of your database container)
|
2. Restore your database from a mysqldump (db is the name of your database container / service name)
|
||||||
- To import from a MySQL dump use the following commands
|
- To import from a MySQL dump use the following commands
|
||||||
```console
|
```console
|
||||||
docker compose cp ./database.dmp db:/dmp
|
docker compose cp ./database.dmp db:/dmp
|
||||||
|
@ -629,7 +629,7 @@ You're already using Nextcloud and want to switch to docker? Great! Here are som
|
||||||
```php
|
```php
|
||||||
'datadirectory' => '/var/www/html/data',
|
'datadirectory' => '/var/www/html/data',
|
||||||
```
|
```
|
||||||
4. Copy your data (`app` is the name of your Nextcloud container):
|
4. Copy your data (`app` is the name of your Nextcloud container / service name):
|
||||||
```console
|
```console
|
||||||
docker compose cp ./data/ app:/var/www/html/
|
docker compose cp ./data/ app:/var/www/html/
|
||||||
docker compose exec app chown -R www-data:www-data /var/www/html/data
|
docker compose exec app chown -R www-data:www-data /var/www/html/data
|
||||||
|
@ -644,7 +644,7 @@ You're already using Nextcloud and want to switch to docker? Great! Here are som
|
||||||
```
|
```
|
||||||
5. Copy only the custom apps you use (or simply redownload them from the web interface):
|
5. Copy only the custom apps you use (or simply redownload them from the web interface):
|
||||||
```console
|
```console
|
||||||
docker compose cp ./custom_apps/ nextcloud_data:/var/www/html/
|
docker compose cp ./custom_apps/ app:/var/www/html/
|
||||||
docker compose exec app chown -R www-data:www-data /var/www/html/custom_apps
|
docker compose exec app chown -R www-data:www-data /var/www/html/custom_apps
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue