mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-04-19 20:09:16 +00:00
nextcloud: update readme
This commit is contained in:
parent
8c724b51da
commit
a42426df86
@ -1,33 +1,33 @@
|
||||
## wonderfall/nextcloud
|
||||
|
||||
[](http://microbadger.com/images/wonderfall/nextcloud "Get your own image badge on microbadger.com")
|
||||
[](http://microbadger.com/images/wonderfall/nextcloud "Get your own version badge on microbadger.com") [](http://microbadger.com/images/wonderfall/nextcloud "Get your own image badge on microbadger.com")
|
||||
|
||||

|
||||
|
||||
|
||||
#### Error 502?
|
||||
Before https://github.com/Wonderfall/dockerfiles/commit/9cbccd93dcbe5048ee428d22965d2d4c9d68cb84, wonderfall/nextcloud used the listen port 80. Now it's **8888** due to OS restrictions (non-root user cannot use port 80). Sorry for the inconvenience!
|
||||
|
||||
#### Features
|
||||
- Based on **Alpine Linux** (edge), with **nginx** and **PHP 7**.
|
||||
- Package authenticity check during build process (sha256sum + GPG).
|
||||
- Data and apps persistence (easy to update, just recreate the container).
|
||||
- OPCache (opcode cache) & APCu (data store) already configured.
|
||||
- system cron configured (15min periodic), replaces AJAX cron.
|
||||
- Based on Alpine Linux.
|
||||
- Bundled with nginx and PHP 7.
|
||||
- Package integrity and authenticity checked during building process.
|
||||
- Data and apps persistence.
|
||||
- OPCache & APCu already configured.
|
||||
- system cron task running.
|
||||
- MySQL, PostgreSQL (server not built-in) and sqlite3 support.
|
||||
- Redis, FTP, SMB, LDAP support.
|
||||
- UID/GID flexibility.
|
||||
- GNU Libiconv for php iconv extension (avoiding errors with some apps).
|
||||
- Environment variables provided (see below).
|
||||
|
||||
#### Tags
|
||||
- **latest** : latest stable version.
|
||||
- **10.0** : latest 10.0.x version (stable)
|
||||
- **9.0** : latest 9.0.x version. (oldstable)
|
||||
- **test** (if any) : latest test version provided by Nextcloud (RC, Beta...)
|
||||
- **9.0** : latest 9.0.x version. (old stable)
|
||||
- **daily** : latest code (daily build).
|
||||
|
||||
Other tags than `daily` are built weekly. For security reasons, you should occasionally update the container, even if you have the latest version of Nextcloud.
|
||||
|
||||
#### Build-time variables
|
||||
- **NEXTCLOUD_VERSION** : version of nextcloud
|
||||
- **GPG_nextcloud** : fingerprint of the signing key
|
||||
- **GNU_LIBICONV_VERSION** : version of GNU Libiconv
|
||||
- **GPG_nextcloud** : signing key fingerprint
|
||||
|
||||
#### Environment variables
|
||||
- **UID** : nextcloud user id *(default : 991)*
|
||||
@ -35,20 +35,21 @@ Before https://github.com/Wonderfall/dockerfiles/commit/9cbccd93dcbe5048ee428d22
|
||||
- **UPLOAD_MAX_SIZE** : maximum upload size *(default : 10G)*
|
||||
- **APC_SHM_SIZE** : apc memory size *(default : 128M)*
|
||||
- **OPCACHE_MEM_SIZE** : opcache memory size in megabytes *(default : 128)*
|
||||
- **CRON_PERIOD** : time interval between two cron tasks *(default : 15m)*
|
||||
|
||||
#### Port
|
||||
- **8888** (recently changed, nginx now runs without root)
|
||||
- **8888**
|
||||
|
||||
#### Volumes
|
||||
- **/data** : Nextcloud data.
|
||||
- **/config** : config.php location.
|
||||
- **/apps2** : Nextcloud downloaded apps.
|
||||
|
||||
#### Database (external container)
|
||||
You have to use an **external** database container. I suggest you to use **MariaDB**, which is a reliable database server. You can use the official `mariadb` image available on Docker Hub to create a database container, which must be linked to the Nextcloud container.
|
||||
#### Database
|
||||
Basically, you can use a database instance running on the host or any other machine. An easier solution is to use an external database container. I suggest you to use MariaDB, which is a reliable database server. You can use the official `mariadb` image available on Docker Hub to create a database container, which must be linked to the Nextcloud container. PostgreSQL can also be used as well.
|
||||
|
||||
#### Setup
|
||||
Pull the image and create a container. `/mnt` can be **anywhere on your host**. Change MYSQL_ROOT_PASSWORD and MYSQL_PASSWORD values (mariadb). You may also want to change UID and GID (nextcloud).
|
||||
Pull the image and create a container. `/mnt` can be anywhere on your host, this is just an example. Change MYSQL_ROOT_PASSWORD and MYSQL_PASSWORD values (mariadb). You may also want to change UID and GID (nextcloud).
|
||||
|
||||
````
|
||||
docker pull wonderfall/nextcloud && docker pull mariadb:10
|
||||
@ -56,13 +57,13 @@ docker run -d --name db_nextcloud -v /mnt/nextcloud/db:/var/lib/mysql -e MYSQL_R
|
||||
docker run -d --name nextcloud --link db_nextcloud:db_nextcloud -e UID=1000 -e GID=1000 -v /mnt/nextcloud/data:/data -v /mnt/nextcloud/config:/config -v /mnt/nextcloud/apps:/apps2 wonderfall/nextcloud
|
||||
```
|
||||
|
||||
**Below you can find a docker-compose file, which is very useful !**
|
||||
**Below you can find a docker-compose file, which is very useful!**
|
||||
|
||||
Now you have to use a **reverse proxy** in order to access to your container through Internet, steps and details are available at the end of the README.md.
|
||||
|
||||
Browse to Nextcloud setup page, then :
|
||||
- **Data folder** : change `/nextcloud/data` to `/data`.
|
||||
- **Database** : fill in all the fields to configure your database.
|
||||
Browse to Nextcloud setup page, then fill in the following fields :
|
||||
- **Data folder** : change `/nextcloud/data` to `/data` (should be `/data` by default).
|
||||
- **Database** :
|
||||
- user : MYSQL_USER.
|
||||
- password : MYSQL_PASSWORD.
|
||||
- name : MYSQL_DATABASE.
|
||||
@ -111,12 +112,16 @@ I advise you to use [docker-compose](https://docs.docker.com/compose/), which is
|
||||
|
||||
```
|
||||
nextcloud:
|
||||
image: wonderfall/nextcloud
|
||||
image: wonderfall/nextcloud:10.0
|
||||
links:
|
||||
- db_nextcloud:db_nextcloud
|
||||
environment:
|
||||
- UID=1000
|
||||
- GID=1000
|
||||
- UPLOAD_MAX_SIZE=10G
|
||||
- APC_SHM_SIZE=128M
|
||||
- OPCACHE_MEM_SIZE=128
|
||||
- CRON_PERIOD=15m
|
||||
volumes:
|
||||
- /mnt/nextcloud/data:/data
|
||||
- /mnt/nextcloud/config:/config
|
||||
@ -135,9 +140,10 @@ db_nextcloud:
|
||||
You can update everything with `docker-compose pull` followed by `docker-compose up -d`.
|
||||
|
||||
#### Reverse proxy
|
||||
You should be familiar with reverse proxying, otherwise you should read some documentation about it. If you're using nginx, there are two possibilites :
|
||||
- nginx is on the host : use the IP address you can get with `docker inspect nextcloud | grep IPAddress\" | head -n1 | grep -Eo "[0-9.]+" `. But whenever the container is restarted or recreated, its IP address can change.
|
||||
If you're using nginx, there are two possibilites :
|
||||
|
||||
- nginx is in a container, things are easier : https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration (example). If you don't get it : **nextcloud is linked to nginx** (containers) so you can use `proxy_pass http://nextcloud`. Very easy. I suggest you to use my image `wonderfall/nginx`, which provides a tool named `ngxproxy` aiming at automatically create a vhost file. You will be asked a few questions.
|
||||
- nginx is on the host : get the Nextcloud container IP address with `docker inspect nextcloud | grep IPAddress\" | head -n1 | grep -Eo "[0-9.]+" `. But whenever the container is restarted or recreated, its IP address can change.
|
||||
|
||||
Headers are already sent by the container, including HSTS, so no need to add them again. **It is strongly recommended to use Nextcloud through an encrypted connection (HTTPS).** [Let's Encrypt](https://letsencrypt.org/) provides free SSL/TLS certificates (trustworthy!).
|
||||
- nginx is in a container, things are easier : https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration (example). If you don't get it : **nextcloud is linked to nginx** (like containers) so you can use `proxy_pass http://nextcloud:8888`. If you're interested, I provide a nginx image available on Docker Hub : `wonderfall/nginx`.
|
||||
|
||||
Headers are already sent by the container, including HSTS, so there's no need to add them again. **It is strongly recommended to use Nextcloud through an encrypted connection (HTTPS).** [Let's Encrypt](https://letsencrypt.org/) provides free SSL/TLS certificates (trustworthy!).
|
||||
|
Loading…
x
Reference in New Issue
Block a user