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

How to convert a column of comma-separated values ​​into columns in MySQL

Preface Sometimes you come across business tables...

Detailed example of IOS database upgrade data migration

Detailed example of IOS database upgrade data mig...

Detailed explanation of the role of brackets in AngularJS

1. The role of brackets 1.1 Square brackets [ ] W...

JavaScript Basics: Immediate Execution Function

Table of contents Immediately execute function fo...

In-depth explanation of the style feature in Vue3 single-file components

Table of contents style scoped style module State...

How to get the intersection/difference/union of two sets in mysql

Common scenarios of MySQL: getting the intersecti...

Windows system mysql5.7.18 installation graphic tutorial

MySQL installation tutorial for Windows system do...

How to modify the default storage engine in MySQL

mysql storage engine: The MySQL server adopts a m...

The big role of HTML meta

There are two meta attributes: name and http-equiv...

14 techniques for high-performance websites

Original : http://developer.yahoo.com/performance...

How to use Lottie animation in React Native project

Lottie is an open source animation library for iO...

Html+CSS floating advertisement strip implementation

1.html part Copy code The code is as follows: <...