From 42a6bec18721868f7efccb88431987b1226ef74e Mon Sep 17 00:00:00 2001 From: Kaloyan Nikolov Date: Thu, 18 Apr 2024 16:53:52 +0300 Subject: [PATCH] Minor readme updates to match the changes for the compose v2 syntax. Signed-off-by: Kaloyan Nikolov --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 56a57190..9b32b90e 100644 --- a/README.md +++ b/README.md @@ -271,7 +271,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. # 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. @@ -332,7 +332,7 @@ volumes: Then run `docker compose up -d`, now you can access Nextcloud at http://localhost:8080/ from your host system. ## 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] > This setup provides **no ssl encryption** and is intended to run behind a proxy. @@ -519,7 +519,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. -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 app: @@ -564,8 +564,8 @@ The `--pull` option tells docker to look for new versions of the base image. The # Migrating an existing installation 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. -2. Restore your database from a mysqldump (db is the name of your database container) +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 / service name) - To import from a MySQL dump use the following commands ```console docker compose cp ./database.dmp db:/dmp @@ -617,7 +617,7 @@ You're already using Nextcloud and want to switch to docker? Great! Here are som ```php '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 docker compose cp ./data/ app:/var/www/html/ docker compose exec app chown -R www-data:www-data /var/www/html/data @@ -632,7 +632,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): ```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 ```