Docker+nextcloud to build a personal cloud storage system

Docker+nextcloud to build a personal cloud storage system

1. Docker installation and startup

yum install epel-release
yum install docker
service docker start

2. Docker-compose installation

curl -L http://github.com/docker/compose/releases/download/1.17.0/docker-compose-Linux-x86_64 /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

3. Image Configuration

1. You need to create a nextcloud network: docker create network nextcloud

[root@VM_0_3_redhat nextcloud]# docker network create nextcloud
b01cd2af784023bb9deb416f6f147b883ceac3d4094b0573bcbe4fe29eb8ef7e

2. Edit the docker-compose.yml file to set the image information: vi docker-compose.yml

version: '2'
services:
 db:
  container_name: cloud_db
  image: mysql
  volumes:
   - "./data/cloud/mysql:/var/lib/mysql"
  restart: always
  environment:
   MYSQL_ROOT_PASSWORD: root
   MYSQL_DATABASE: nextcloud
 app:
  container_name: cloud_app
  depends_on:
   -db
  image: nextcloud
  volumes:
   - ./data/cloud/config:/var/www/html/config
   - ./data/cloud/data:/var/www/html/data
   - ./data/cloud/apps:/var/www/html/apps
  links:
   -db
  ports:
   - "2333:80"
  restart: always
 cron:
  container_name: cloud_cron
  image: nextcloud
  links:
   -db
  volumes_from:
   - app
  user: www-data
  entrypoint: |
   bash -c 'bash -s <<EOF
   trap "break;exit" SIGHUP SIGINT SIGTERM
   while /bin/true; do
    /usr/local/bin/php /var/www/html/cron.php
    sleep 900
   done
   EOF'
  restart: always
 web:
  container_name: cloud_web
  image: abiosoft/caddy
  volumes:
   - ./Caddyfile:/etc/Caddyfile
   - ~/.caddy:/root/.caddy
  ports:
   - 80:80
   -443:443
  restart: always
networks:
 default:
  external:
   name: nextcloud

3. Pull the image: docker-compose up -d

4. Start configuration:

1. After the image is successfully pulled, check the listening port, which is the same as the 2333 port listening we set in docker-compose.yml

2. Log in to http://ip:2333

3. Create a user to log in to nextcloud, and then fill in the database information. We specified the use of MySQL database earlier. Here, fill in the MySQL username and password database. Just fill in db for the host name. Finally click on Install.

4. After the installation is complete, enter the nextcloud main interface. The first time you enter, you will be prompted with the multi-client download address.

5. Personal storage main interface.

6. According to the docker-compose.yml configuration, the data information in the image will be saved locally.

This is the end of this article about the implementation of building a personal cloud storage system with docker+nextcloud. For more information about building a cloud storage system with docker nextcloud, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Tutorial on building nextcloud personal network disk with Docker
  • Docker uses nextcloud to build a private Baidu cloud disk
  • How to deploy nextcloud network disk using docker
  • How to install and deploy NextCloud private network disk using docker

<<:  Vue realizes cascading selection of provinces, cities and districts

>>:  Some points on using standard HTML codes in web page creation

Recommend

Tutorial on importing and exporting Docker containers

background The popularity of Docker is closely re...

Vue implements anchor positioning function

This article example shares the specific code of ...

Detailed explanation of Vue router routing guard

Table of contents 1. Global beforeEach 1. Global ...

Solutions to invalid is Null segment judgment and IFNULL() failure in MySql

MySql Null field judgment and IFNULL failure proc...

Detailed tutorial on installing Docker on CentOS 8

1. Previous versions yum remove docker docker-cli...

Docker installation and configuration command code examples

Docker installation Install dependency packages s...

How to use jsonp in vue

Table of contents 1. Introduction 2. Installation...

Analysis of centos6 method of deploying kafka project using docker

This article describes how to use docker to deplo...

HTML Code Writing Guide

Common Convention Tags Self-closing tags, no need...

Three implementation methods of Mysql copy table and grant analysis

How to quickly copy a table First, create a table...

Angular Dependency Injection Explained

Table of contents Overview 1. Dependency Injectio...

IIS7~IIS8.5 delete or modify the server protocol header Server

Requirements: Remove HTTP response headers in IIS...

HTML table tag tutorial (11): horizontal alignment attribute ALIGN

In the horizontal direction, you can set the alig...