From a25c932af3a55842b73c5d14b463028c34f3e21e Mon Sep 17 00:00:00 2001 From: kev Date: Fri, 7 Jan 2022 18:20:29 +0800 Subject: [PATCH] update nextcloud --- nextcloud/README.md | 24 -------------- nextcloud/arm/docker-compose.yml | 15 ++++++--- nextcloud/docker-compose.yml | 54 +++++++++++++++++++++----------- redis/README.md | 17 +++++----- redis/docker-compose.yml | 18 ++++++----- 5 files changed, 67 insertions(+), 61 deletions(-) diff --git a/nextcloud/README.md b/nextcloud/README.md index 400f74f..bd0b771 100644 --- a/nextcloud/README.md +++ b/nextcloud/README.md @@ -5,30 +5,6 @@ nextcloud [Nextcloud][1] puts your data at your fingertips, under your control. -## docker-compose.yml - -```yaml -nextcloud: - image: indiehosters/nextcloud - ports: - - "127.0.0.1:9000:9000" - volumes: - - ./data/apps:/var/www/html/apps - - ./data/config:/var/www/html/config - - ./data/data:/var/www/html/data - restart: always - -nginx: - image: nginx:alpine - volumes: - - ./nginx.conf:/etc/nginx/conf.d/default.conf - - ./ssl:/etc/nginx/ssl - volumes_from: - - nextcloud - net: host - restart: always -``` - ## Server Setup ```bash diff --git a/nextcloud/arm/docker-compose.yml b/nextcloud/arm/docker-compose.yml index e2c6640..68f0033 100644 --- a/nextcloud/arm/docker-compose.yml +++ b/nextcloud/arm/docker-compose.yml @@ -3,7 +3,7 @@ version: "3.8" services: nextcloud: - image: arm32v7/nextcloud:22 + image: nextcloud:stable ports: - "8080:80" volumes: @@ -13,14 +13,14 @@ services: - POSTGRES_DB=nextcloud - POSTGRES_USER=nextcloud - POSTGRES_PASSWORD=nextcloud + - REDIS_HOST=redis depends_on: - postgres + - redis restart: unless-stopped postgres: - image: arm32v7/postgres:13-alpine - ports: - - "5432:5432" + image: postgres:14-alpine volumes: - ./data/postgres:/var/lib/postgresql/data environment: @@ -28,3 +28,10 @@ services: - POSTGRES_PASSWORD=nextcloud - POSTGRES_DB=nextcloud restart: unless-stopped + + redis: + image: redis:6-alpine + command: --save 900 1 + volumes: + - ./data/redis:/data + restart: unless-stopped diff --git a/nextcloud/docker-compose.yml b/nextcloud/docker-compose.yml index 9164d65..68f0033 100644 --- a/nextcloud/docker-compose.yml +++ b/nextcloud/docker-compose.yml @@ -1,19 +1,37 @@ -nextcloud: - image: indiehosters/nextcloud - ports: - - "127.0.0.1:9000:9000" - volumes: - - ./data/apps:/var/www/html/apps - - ./data/config:/var/www/html/config - - ./data/data:/var/www/html/data - restart: always +version: "3.8" -nginx: - image: nginx:alpine - volumes: - - ./nginx.conf:/etc/nginx/conf.d/default.conf - - ./ssl:/etc/nginx/ssl - volumes_from: - - nextcloud - net: host - restart: always +services: + + nextcloud: + image: nextcloud:stable + ports: + - "8080:80" + volumes: + - ./data/nextcloud:/var/www/html + environment: + - POSTGRES_HOST=postgres + - POSTGRES_DB=nextcloud + - POSTGRES_USER=nextcloud + - POSTGRES_PASSWORD=nextcloud + - REDIS_HOST=redis + depends_on: + - postgres + - redis + restart: unless-stopped + + postgres: + image: postgres:14-alpine + volumes: + - ./data/postgres:/var/lib/postgresql/data + environment: + - POSTGRES_USER=nextcloud + - POSTGRES_PASSWORD=nextcloud + - POSTGRES_DB=nextcloud + restart: unless-stopped + + redis: + image: redis:6-alpine + command: --save 900 1 + volumes: + - ./data/redis:/data + restart: unless-stopped diff --git a/redis/README.md b/redis/README.md index bc95054..cd1c1f7 100644 --- a/redis/README.md +++ b/redis/README.md @@ -8,13 +8,16 @@ redis ## docker-compose.yml ```yaml -redis: - image: redis:alpine - ports: - - "127.0.0.1:6379:6379" - volumes: - - ./data:/data - restart: always +version: "3.8" +services: + redis: + image: redis:6-alpine + command: --save 900 1 + ports: + - "6379:6379" + volumes: + - ./data:/data + restart: unless-stopped ``` [1]: https://redis.io/ diff --git a/redis/docker-compose.yml b/redis/docker-compose.yml index 2761c30..919bb9f 100644 --- a/redis/docker-compose.yml +++ b/redis/docker-compose.yml @@ -1,8 +1,10 @@ -redis: - image: redis:alpine - command: --save 900 1 - ports: - - "127.0.0.1:6379:6379" - volumes: - - ./data:/data - restart: always +version: "3.8" +services: + redis: + image: redis:6-alpine + command: --save 900 1 + ports: + - "6379:6379" + volumes: + - ./data:/data + restart: unless-stopped