services:
web:
image: nginx
container_name: cloud-web
restart: always
ports:
- 80:80
- 443:443/tcp
- 443:443/udp
- 8080:8080
volumes:
- /docker/etc/nginx:/etc/nginx
- /docker/etc/ssl:/etc/ssl:ro
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
db:
image: mariadb:10.11.7
container_name: cloud-db
restart: always
command: --transaction-isolation=READ-COMMITTED --log-bin=mysqld-bin --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed --log_bin_trust_function_creators=true
volumes:
- /docker/mariadb/var/lib/mysql:/var/lib/mysql:rw
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- type: tmpfs
target: /tmp
environment:
- MYSQL_ROOT_PASSWORD=db_admin_pass
- MYSQL_PASSWORD=db_user_pass
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MARIADB_AUTO_UPGRADE=yes
- REDIS_HOST=redis
- REDIS_PORT=6379
redis:
image: redis:alpine
container_name: cloud-cache
restart: always
app:
image: nextcloud:29.0.1
container_name: cloud-server
hostname: cloud.example.com
restart: always
ports:
- 8880:80
links:
- db
- redis
volumes:
- /docker/nextcloud/var/www/html:/var/www/html:rw
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- type: tmpfs
target: /tmp:exec
devices:
- /dev/dri:/dev/dri
environment:
- MYSQL_PASSWORD=db_user_pass
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_HOST=db
- OVERWRITEHOST=cloud.example.com
- OVERWRITEPROTOCOL=https
- NEXTCLOUD_ADMIN_USER=nc_admin_user
- NEXTCLOUD_ADMIN_PASSWORD=nc_admin_pass
- NEXTCLOUD_UPLOAD_LIMIT=20G
- PHP_UPLOAD_LIMIT=32G
- PHP_MEMORY_LIMIT=32G
- APACHE_BODY_LIMIT=0
|