This repository has been archived on 2021-12-24. You can view files and clone it, but cannot push or open issues/pull-requests.
self-hosting/nextcloud/docker-compose.yml

76 lines
1.6 KiB
YAML
Raw Normal View History

2021-04-23 15:02:42 +02:00
version: '2.4'
2021-01-05 12:43:32 +01:00
services:
app:
2021-04-23 15:02:42 +02:00
image: 'nextcloud:21.0.1-apache'
2021-01-05 12:43:32 +01:00
restart: 'always'
2021-04-23 15:02:42 +02:00
healthcheck:
test: 'curl -f localhost || exit 1'
interval: '1m'
timeout: '10s'
retries: 3
start_period: '10s'
2021-01-05 12:43:32 +01:00
depends_on:
2021-04-23 15:02:42 +02:00
db:
condition: 'service_healthy'
redis:
condition: 'service_healthy'
2021-01-05 12:43:32 +01:00
env_file:
2021-01-09 17:02:38 +01:00
- '.env'
2021-01-05 12:43:32 +01:00
networks:
- 'default'
- 'nginx'
volumes:
- 'config:/var/www/html/config'
2021-01-05 12:58:45 +01:00
- 'data:/var/www/html/data'
- 'root:/var/www/html'
2021-01-05 12:43:32 +01:00
cron:
2021-04-23 15:02:42 +02:00
image: 'nextcloud:21.0.1-apache'
2021-01-05 12:58:45 +01:00
restart: 'always'
2021-04-23 15:02:42 +02:00
entrypoint: '/cron.sh'
2021-01-05 12:43:32 +01:00
depends_on:
2021-04-23 15:02:42 +02:00
app:
condition: 'service_healthy'
2021-01-09 17:02:38 +01:00
env_file:
- '.env'
2021-01-05 12:43:32 +01:00
volumes:
- 'config:/var/www/html/config'
2021-01-05 12:58:45 +01:00
- 'data:/var/www/html/data'
- 'root:/var/www/html'
2021-01-05 12:43:32 +01:00
db:
2021-05-14 23:00:58 +02:00
image: 'postgres:13.3-alpine'
2021-01-05 12:43:32 +01:00
restart: 'always'
2021-01-09 17:02:38 +01:00
environment:
2021-04-23 15:02:42 +02:00
- 'POSTGRES_DB=nextcloud'
- 'POSTGRES_USER=nextcloud'
- 'POSTGRES_PASSWORD=nextcloud'
2021-01-05 12:43:32 +01:00
volumes:
- 'db-data:/var/lib/postgresql/data'
redis:
2021-05-04 01:00:38 +02:00
image: 'redis:6.2.3-alpine'
2021-01-05 12:43:32 +01:00
restart: 'always'
2021-04-23 15:02:42 +02:00
healthcheck:
test: 'redis-cli -h localhost ping'
interval: '10s'
timeout: '5s'
retries: 3
2021-01-05 12:43:32 +01:00
networks:
nginx:
external: true
volumes:
2021-01-05 12:58:45 +01:00
config:
2021-01-05 12:43:32 +01:00
data:
db-data:
2021-01-05 12:58:45 +01:00
root: