version: "3" services: nextcloud: ## Using Dockerfile because I want tu use 'cron' ## and I need to add it first to the pure image #image: nextcloud:latest build: . container_name: ${NC_CONTAINER_NAME:-nextcloud} restart: ${NC_RESTART:-unless-stopped} expose: - 9000 depends_on: - db volumes: - ${LOCAL_STACK_DIR}/nextcloud/html:/var/www/html - /etc/timezone:/etc/timezone:ro networks: - default - nextcloud env_file: - nextcloud.env - nc_db.env environment: MYSQL_HOST: ${MYSQL_HOST:-db} REDIS_HOST: ${REDIS_HOST:-redis} db: image: ${DB_IMG:-mariadb}:${DB_TAG:-latest} container_name: ${DB_CONTAINER_NAME:-nextcloud-db} restart: ${DB_RESTART:-unless-stopped} expose: - 3306 volumes: - ${LOCAL_STACK_DIR}/db/data:/var/lib/mysql networks: - nextcloud env_file: - nc_db.env environment: MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} MARIADB_AUTO_UPGRADE: 1 command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --skip-innodb-read-only-compressed redis: image: ${RD_IMG:-redis}:${RD_TAG:-alpine} container_name: ${RD_CONTAINER_NAME:-nextcloud-redis} restart: ${RD_RESTART:-unless-stopped} networks: - nextcloud networks: default: external: name: ${NETWORK} nextcloud: internal: true