89 lines
2.5 KiB
YAML
89 lines
2.5 KiB
YAML
|
|
services:
|
|
nextcloud-app:
|
|
build: .
|
|
image: local-nextcloud
|
|
container_name: nextcloud_app
|
|
restart: unless-stopped
|
|
volumes:
|
|
- /var/lib/nextcloud/tmp:/tmp
|
|
- ./nextcloud_data:/var/www/html
|
|
environment:
|
|
- POSTGRES_HOST=synapse-postgres-1 # Change to your Postgres IP/Hostname
|
|
- POSTGRES_DB=${DB_NAME} # Your Postgres DB name
|
|
- POSTGRES_USER=${DB_UNAME} # Your Postgres user
|
|
- POSTGRES_PASSWORD=${DB_PASS} # Your Postgres password
|
|
|
|
- REDIS_HOST=nextcloud-redis
|
|
- REDIS_HOST_PASSWORD=${REDIS_PASS}
|
|
|
|
- NEXTCLOUD_TEMP_DIRECTORY=/var/www/html/data/tmp
|
|
|
|
- OBJECTSTORE_S3_HOST=s3.eu-central-003.backblazeb2.com
|
|
- OBJECTSTORE_S3_REGION=eu-central-003
|
|
- OBJECTSTORE_S3_BUCKET=${BUCKET_NAME}
|
|
- OBJECTSTORE_S3_KEY=${BUCKET_AKEY}
|
|
- OBJECTSTORE_S3_SECRET=${BUCKET_SECRET}
|
|
- OBJECTSTORE_S3_PORT=443
|
|
- OBJECTSTORE_S3_SSL=true
|
|
- OBJECTSTORE_S3_USEPATHSTYLE=false
|
|
depends_on:
|
|
- nextcloud-redis
|
|
networks:
|
|
- postgre-general
|
|
- nextcloud-network
|
|
- reverse_proxy_default
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -f http://localhost:80/status.php | grep -q '\"installed\":true' || exit 1"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
nextcloud-redis:
|
|
image: redis:alpine # Essential for file locking, uses almost no RAM (~20MB)
|
|
container_name: nextcloud_redis
|
|
restart: unless-stopped
|
|
command: redis-server --requirepass ${REDIS_PASS}
|
|
networks:
|
|
- nextcloud-network
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "redis-cli -a ${REDIS_PASS} ping | grep PONG || exit 1"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 5s
|
|
|
|
nextcloud-cron:
|
|
build: .
|
|
image: local-nextcloud
|
|
container_name: nextcloud_cron
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./nextcloud_data:/var/www/html
|
|
entrypoint: /cron.sh
|
|
depends_on:
|
|
- nextcloud-app
|
|
networks:
|
|
- nextcloud-network
|
|
- postgre-general
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "LC_ALL=C; [ $$(($$(date +%s) - $$(runuser -u www-data -- php /var/www/html/occ config:app:get core lastcron))) -le 900 ] || exit 1"]
|
|
interval: 5m
|
|
timeout: 15s
|
|
retries: 3
|
|
start_period: 2m
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
networks:
|
|
nextcloud-network:
|
|
postgre-general:
|
|
external: true
|
|
reverse_proxy_default:
|
|
external: true
|