Languages avaliable: pt-BR
You need to have, on your server, the installed docker. The installation can be done with an official script, following the following steps:
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
sudo usermod -aG docker $USER
rm get-docker.sh
Follow the instructions of this repository:
https://github.com/LibreCodeCoop/nginx-proxy
Copy the .env.example
to .env
and set the values.
cp .env.example .env
Environment | service | Description |
---|---|---|
VIRTUAL_HOST |
web |
Your domain |
LETSENCRYPT_HOST |
web |
Your domain |
LETSENCRYPT_EMAIL |
web |
Your sysadmin email |
NEXTCLOUD_TRUSTED_DOMAINS |
app |
domains separated by comma. The domain web is mandatory, add your domain together with whe domain web. The domain web is the domain of Nginx service. |
PS: Let's Encrypt only work in servers when the
VIRTUAL_HOST
andLETSENCRYPT_HOST
have a valid public domain registered in a DNS server. Don't try to use in localhost, don't work!
Create a network
docker network create reverse-proxy
docker network create postgres
After finish the setup, access this url: https://yourdomain.tld/settings/admin/overview.
If is necessary run any occ command, run like this:
docker compose exec -u www-data app ./occ db:add-missing-indices
docker compose exec -u www-data app ./occ db:convert-filecache-bigint
You can do this using environments and creating a file called docker-compose.override.yml
to add new services.
.ini
file at volumes/php/
folder. Example: volumes/php/xdebug.ini
docker-compose.override.yml
adding your volume
services:
app:
volumes:
- ./volumes/php/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
# The postgres service is executed separated to be possible reuse this service to other applications that use PostgreSQL
docker compose up -f docker-compose-postgres.yml -d
docker compose up -d
docker compose -d
Change the value of NEXTCLOUDVERSION at .env
file and put the tag name that you want to use. Check the availables tags here: https://hub.docker.com//nextcloud/tags
Build the images, down the containers and get up again:
docker compose build --pull
docker compose up -d
If you want to see the logs, run:
docker compose logs -f --tail=100
You will see this message in the logs and other many upgrade messages:
app_1 | 2020-04-28T19:49:38.568623133Z Initializing nextcloud 18.0.4.2 ...
app_1 | 2020-04-28T19:49:38.577733913Z Upgrading nextcloud from 18.0.3.0 ...