Improved Nextcloud config

pull/10/head
Jef Roosens 2021-04-23 15:02:42 +02:00
parent 4a4437683e
commit 0b85900b71
Signed by: Jef Roosens
GPG Key ID: B580B976584B5F30
3 changed files with 30 additions and 22 deletions

View File

@ -1,4 +1,4 @@
version: '2.8'
version: '2.4'
services:
app:

View File

@ -2,7 +2,7 @@
POSTGRES_HOST=db
POSTGRES_DB=nextcloud
POSTGRES_USER=nextcloud
POSTGRES_PASSWORD=pass
POSTGRES_PASSWORD=nextcloud
# Redis
REDIS_HOST=redis

View File

@ -1,17 +1,24 @@
version: '3.5'
version: '2.4'
services:
app:
image: 'nextcloud:20-apache'
image: 'nextcloud:21.0.1-apache'
restart: 'always'
healthcheck:
test: 'curl -f localhost || exit 1'
interval: '1m'
timeout: '10s'
retries: 3
start_period: '10s'
depends_on:
- 'db'
- 'redis'
db:
condition: 'service_healthy'
redis:
condition: 'service_healthy'
env_file:
- '.env'
labels:
- 'com.centurylinklabs.watchtower.enable=true'
networks:
- 'default'
- 'nginx'
@ -21,40 +28,41 @@ services:
- 'root:/var/www/html'
cron:
image: 'nextcloud:20-apache'
entrypoint: '/cron.sh'
image: 'nextcloud:21.0.1-apache'
restart: 'always'
entrypoint: '/cron.sh'
depends_on:
- 'app'
app:
condition: 'service_healthy'
env_file:
- '.env'
labels:
- 'com.centurylinklabs.watchtower.enable=true'
volumes:
- 'config:/var/www/html/config'
- 'data:/var/www/html/data'
- 'root:/var/www/html'
db:
image: 'postgres:13-alpine'
image: 'postgres:13.2-alpine'
restart: 'always'
environment:
- 'POSTGRES_DB'
- 'POSTGRES_USER'
- 'POSTGRES_PASSWORD'
labels:
- 'com.centurylinklabs.watchtower.enable=true'
- 'POSTGRES_DB=nextcloud'
- 'POSTGRES_USER=nextcloud'
- 'POSTGRES_PASSWORD=nextcloud'
volumes:
- 'db-data:/var/lib/postgresql/data'
redis:
image: 'redis:6-alpine'
image: 'redis:6.0.12-alpine'
restart: 'always'
labels:
- 'com.centurylinklabs.watchtower.enable=true'
healthcheck:
test: 'redis-cli -h localhost ping'
interval: '10s'
timeout: '5s'
retries: 3
networks:
nginx: