Remove comments v2
This commit is contained in:
@@ -1,136 +1,81 @@
|
||||
# Nextcloud with PostgreSQL and Valkey Configuration
|
||||
services:
|
||||
# PostgreSQL Database Service
|
||||
nextcloud_db:
|
||||
# Basic container configuration
|
||||
container_name: nextcloud_db
|
||||
image: docker.io/library/postgres:17.5
|
||||
restart: unless-stopped
|
||||
|
||||
# Database credentials
|
||||
environment:
|
||||
- POSTGRES_USER=${POSTGRES_USER} # Database username
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} # Database password
|
||||
- POSTGRES_DB=${POSTGRES_DB} # Database name
|
||||
|
||||
# Persistent storage configuration
|
||||
- POSTGRES_USER=${POSTGRES_USER}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
- POSTGRES_DB=${POSTGRES_DB}
|
||||
volumes:
|
||||
- ${APPDATA_PATH}/nextcloud/db:/var/lib/postgresql/data # Database files
|
||||
|
||||
# Network configuration
|
||||
- ${APPDATA_PATH}/nextcloud/db:/var/lib/postgresql/data
|
||||
ports:
|
||||
- ${DB_PORT}:5432 # PostgreSQL port
|
||||
|
||||
# Health monitoring
|
||||
- ${DB_PORT}:5432
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER}"]
|
||||
start_period: 10s # Initial delay
|
||||
interval: 10s # Check frequency
|
||||
timeout: 5s # Timeout duration
|
||||
retries: 3 # Retry attempts
|
||||
start_period: 10s
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
# Valkey (Redis-compatible) Cache Service
|
||||
nextcloud_valkey:
|
||||
# Basic container configuration
|
||||
container_name: nextcloud_valkey
|
||||
image: docker.io/valkey/valkey:8.1.3
|
||||
restart: unless-stopped
|
||||
|
||||
# Runtime configuration
|
||||
command: valkey-server --save 60 1 --requirepass ${VALKEY_PASSWORD} # Persistence and auth
|
||||
|
||||
# Persistent storage configuration
|
||||
command: valkey-server --save 60 1 --requirepass ${VALKEY_PASSWORD}
|
||||
volumes:
|
||||
- ${APPDATA_PATH}/nextcloud/valkey:/data # Valkey data
|
||||
|
||||
# Network configuration
|
||||
- ${APPDATA_PATH}/nextcloud/valkey:/data
|
||||
ports:
|
||||
- ${VALKEY_PORT}:6379 # Valkey port
|
||||
|
||||
# Health monitoring
|
||||
- ${VALKEY_PORT}:6379
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "echo 'auth ${VALKEY_PASSWORD}\nping' | valkey-cli | grep PONG"]
|
||||
start_period: 20s # Initial delay
|
||||
interval: 30s # Check frequency
|
||||
retries: 5 # Retry attempts
|
||||
timeout: 3s # Timeout duration
|
||||
start_period: 20s
|
||||
interval: 30s
|
||||
retries: 5
|
||||
timeout: 3s
|
||||
|
||||
# Nextcloud Application Service
|
||||
nextcloud_app:
|
||||
# Basic container configuration
|
||||
image: docker.io/library/nextcloud:31.0.7
|
||||
container_name: nextcloud_app
|
||||
restart: unless-stopped
|
||||
|
||||
# Service dependencies
|
||||
depends_on:
|
||||
nextcloud_db:
|
||||
condition: service_healthy # Requires healthy database
|
||||
condition: service_healthy
|
||||
nextcloud_valkey:
|
||||
condition: service_healthy # Requires healthy valkey
|
||||
|
||||
# Environment variables
|
||||
condition: service_healthy
|
||||
environment:
|
||||
# Database configuration
|
||||
- POSTGRES_HOST=nextcloud_db:5432 # PostgreSQL host and port
|
||||
- POSTGRES_DB=${POSTGRES_DB} # Database name
|
||||
- POSTGRES_USER=${POSTGRES_USER} # Database username
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} # Database password
|
||||
|
||||
# Redis/Valkey cache configuration
|
||||
- REDIS_HOST=nextcloud_valkey # Valkey hostname
|
||||
- REDIS_HOST_PORT=6379 # Valkey port
|
||||
- REDIS_HOST_PASSWORD=${VALKEY_PASSWORD} # Valkey authentication
|
||||
|
||||
# PHP performance tuning
|
||||
- PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT} # Memory allocation
|
||||
- PHP_UPLOAD_LIMIT=${PHP_UPLOAD_LIMIT} # Max upload size
|
||||
|
||||
# Security settings
|
||||
- APACHE_DISABLE_REWRITE_IP=${APACHE_DISABLE_REWRITE_IP} # IP address handling
|
||||
|
||||
# Persistent storage configuration
|
||||
- POSTGRES_HOST=nextcloud_db:5432
|
||||
- POSTGRES_DB=${POSTGRES_DB}
|
||||
- POSTGRES_USER=${POSTGRES_USER}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
- REDIS_HOST=nextcloud_valkey
|
||||
- REDIS_HOST_PORT=6379
|
||||
- REDIS_HOST_PASSWORD=${VALKEY_PASSWORD}
|
||||
- PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT}
|
||||
- PHP_UPLOAD_LIMIT=${PHP_UPLOAD_LIMIT}
|
||||
- APACHE_DISABLE_REWRITE_IP=${APACHE_DISABLE_REWRITE_IP}
|
||||
volumes:
|
||||
- ${APPDATA_PATH}/nextcloud/app:/var/www/html
|
||||
|
||||
# Network configuration
|
||||
ports:
|
||||
- ${APP_PORT}:80
|
||||
|
||||
# Nextcloud Cron Service
|
||||
nextcloud_cron:
|
||||
# Basic container configuration
|
||||
image: docker.io/library/nextcloud:31.0.7
|
||||
container_name: nextcloud_cron
|
||||
restart: unless-stopped
|
||||
|
||||
# Service dependencies
|
||||
depends_on:
|
||||
- nextcloud_app
|
||||
|
||||
# Entry point
|
||||
entrypoint: /cron.sh
|
||||
|
||||
# Environment variables
|
||||
environment:
|
||||
# Database configuration
|
||||
- POSTGRES_HOST=nextcloud_db:5432 # PostgreSQL host and port
|
||||
- POSTGRES_DB=${POSTGRES_DB} # Database name
|
||||
- POSTGRES_USER=${POSTGRES_USER} # Database username
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} # Database password
|
||||
|
||||
# Redis/Valkey cache configuration
|
||||
- REDIS_HOST=nextcloud_valkey # Valkey hostname
|
||||
- REDIS_HOST_PORT=6379 # Valkey port
|
||||
- REDIS_HOST_PASSWORD=${VALKEY_PASSWORD} # Valkey authentication
|
||||
|
||||
# PHP performance tuning
|
||||
- PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT} # Memory allocation
|
||||
- PHP_UPLOAD_LIMIT=${PHP_UPLOAD_LIMIT} # Max upload size
|
||||
|
||||
# Security settings
|
||||
- APACHE_DISABLE_REWRITE_IP=${APACHE_DISABLE_REWRITE_IP} # IP address handling
|
||||
|
||||
# Persistent storage configuration
|
||||
- POSTGRES_HOST=nextcloud_db:5432
|
||||
- POSTGRES_DB=${POSTGRES_DB}
|
||||
- POSTGRES_USER=${POSTGRES_USER}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
- REDIS_HOST=nextcloud_valkey
|
||||
- REDIS_HOST_PORT=6379
|
||||
- REDIS_HOST_PASSWORD=${VALKEY_PASSWORD}
|
||||
- PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT}
|
||||
- PHP_UPLOAD_LIMIT=${PHP_UPLOAD_LIMIT}
|
||||
- APACHE_DISABLE_REWRITE_IP=${APACHE_DISABLE_REWRITE_IP}
|
||||
volumes:
|
||||
- ${APPDATA_PATH}/nextcloud/app:/var/www/html
|
||||
|
Reference in New Issue
Block a user