version: '3' services: db: image: mariadb:latest command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW restart: always volumes: - db:/var/lib/mysql environment: - MYSQL_ALLOW_EMPTY_PASSWORD=yes - MYSQL_PASSWORD=nextcloud - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud networks: - nextcloud redis: image: redis:alpine restart: always volumes: - redis_data:/data networks: - nextcloud app: image: nextcloud:20-fpm-alpine restart: always volumes: - nextcloud_data:/var/www/html environment: - MYSQL_HOST=db - REDIS_HOST=redis - MYSQL_PASSWORD=nextcloud - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud depends_on: - db - redis networks: - nextcloud cron: image: nextcloud:20-fpm-alpine restart: always volumes: - nextcloud_data:/var/www/html entrypoint: /cron.sh environment: - MYSQL_HOST=db - REDIS_HOST=redis - MYSQL_PASSWORD=nextcloud - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud depends_on: - db - redis networks: - nextcloud web: image: nginx:alpine restart: always ports: - 8080:80 volumes: - nextcloud_data:/var/www/html:ro # - nginx_conf:/etc/nginx/conf.d - ./nginx-nextcloud.conf:/etc/nginx/conf.d/default.conf:ro depends_on: - app networks: - nextcloud # - proxy-net # environment: # - VIRTUAL_HOST=cloud.example.com # - VIRTUAL_PORT=80 # - SSL_POLICY=Mozilla-Modern onlyoffice: image: onlyoffice/documentserver:6.1 restart: always ports: - 8088:80 volumes: - onlyoffice_data:/var/www/onlyoffice/Data - onlyoffice_log:/var/log/onlyoffice - onlyoffice_fonts:/usr/share/fonts/truetype/custom - onlyoffice_lib:/var/lib/onlyoffice - onlyoffice_db:/var/lib/postgresql - onlyoffice_redis:/var/lib/redis - onlyoffice_rabbitmq:/var/lib/rabbitmq networks: - nextcloud # - proxy-net # environment: # - VIRTUAL_HOST=office.example.com # - VIRTUAL_PORT=80 # - SSL_POLICY=Mozilla-Modern volumes: nextcloud_data: db: # nginx_conf: redis_data: onlyoffice_data: onlyoffice_log: onlyoffice_fonts: onlyoffice_lib: onlyoffice_db: onlyoffice_redis: onlyoffice_rabbitmq: networks: nextcloud: # proxy-net: # external: true