refactor docker compose
This commit is contained in:
Binary file not shown.
@@ -1,7 +1,15 @@
|
||||
[mysqld]
|
||||
innodb_buffer_pool_size = 1G
|
||||
innodb_log_file_size = 256M
|
||||
innodb_flush_log_at_trx_commit = 2
|
||||
innodb_flush_method = O_DIRECT
|
||||
query_cache_size = 0
|
||||
query_cache_type = 0
|
||||
# Performance InnoDB
|
||||
innodb_buffer_pool_size = 2G
|
||||
innodb_io_capacity = 200
|
||||
innodb_io_capacity_max = 400
|
||||
innodb_read_io_threads = 4
|
||||
innodb_write_io_threads = 4
|
||||
innodb_log_file_size = 512M
|
||||
|
||||
# Nextcloud optimizations
|
||||
transaction-isolation = READ-COMMITTED
|
||||
binlog_format = ROW
|
||||
|
||||
# Connections
|
||||
max_connections = 200
|
||||
|
||||
@@ -8,36 +8,50 @@ services:
|
||||
volumes:
|
||||
- ./data:/var/www/html
|
||||
environment:
|
||||
# Database
|
||||
- MYSQL_HOST=db
|
||||
- MYSQL_DATABASE=nextcloud
|
||||
- MYSQL_DATABASE=${MYSQL_DATABASE:-nextcloud}
|
||||
- MYSQL_USER=${MYSQL_USER}
|
||||
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
||||
|
||||
- NEXTCLOUD_TRUSTED_DOMAINS=cloud.agence66.fr
|
||||
# Domaine
|
||||
- NEXTCLOUD_TRUSTED_DOMAINS=${NEXTCLOUD_DOMAIN}
|
||||
- TRUSTED_PROXIES=${TRUSTED_PROXIES:-172.16.0.0/12}
|
||||
- OVERWRITEPROTOCOL=https
|
||||
- OVERWRITEHOST=cloud.agence66.fr
|
||||
|
||||
- OVERWRITEHOST=${NEXTCLOUD_DOMAIN}
|
||||
- OVERWRITECLIURL=https://${NEXTCLOUD_DOMAIN}
|
||||
# Redis
|
||||
- REDIS_HOST=${REDIS_HOST}
|
||||
- REDIS_HOST_PASSWORD=${REDIS_HOST_PASSWORD}
|
||||
|
||||
- PHP_UPLOAD_MAX_FILESIZE=10G
|
||||
- PHP_MEMORY_LIMIT=2048M
|
||||
- PHP_MAX_EXECUTION_TIME=360
|
||||
- PHP_MAX_INPUT_TIME=360
|
||||
|
||||
- APACHE_BODY_LIMIT=10737418240
|
||||
# PHP
|
||||
- PHP_MEMORY_LIMIT=4096M
|
||||
- PHP_UPLOAD_MAX_FILESIZE=2G
|
||||
- PHP_POST_MAX_SIZE=2G
|
||||
- PHP_MAX_EXECUTION_TIME=1800
|
||||
- PHP_MAX_INPUT_TIME=1800
|
||||
# Apache
|
||||
- APACHE_BODY_LIMIT=2147483648
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost/status.php"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
depends_on:
|
||||
- db
|
||||
db:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
networks:
|
||||
- nextcloud-net
|
||||
- traefik-net
|
||||
|
||||
redis:
|
||||
image: redis:alpine
|
||||
restart: unless-stopped
|
||||
command: redis-server --requirepass ${REDIS_HOST_PASSWORD} --maxmemory 512mb --maxmemory-policy allkeys-lru
|
||||
networks:
|
||||
- nextcloud-net
|
||||
command: redis-server --requirepass ${REDIS_HOST_PASSWORD}
|
||||
nextcloud-cron:
|
||||
|
||||
cron:
|
||||
image: nextcloud:latest
|
||||
restart: always
|
||||
volumes_from:
|
||||
@@ -46,8 +60,10 @@ services:
|
||||
depends_on:
|
||||
- nextcloud
|
||||
- db
|
||||
- redis
|
||||
networks:
|
||||
- nextcloud-net
|
||||
|
||||
db:
|
||||
image: mariadb:10.11
|
||||
restart: unless-stopped
|
||||
@@ -59,8 +75,14 @@ services:
|
||||
- MYSQL_DATABASE=nextcloud
|
||||
- MYSQL_USER=${MYSQL_USER}
|
||||
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
||||
healthcheck:
|
||||
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
networks:
|
||||
- nextcloud-net
|
||||
|
||||
networks:
|
||||
nextcloud-net:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user