1. Docker installation and startupyum install epel-release yum install docker service docker start 2. Docker-compose installationcurl -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 Configuration1. 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: 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:
|
<<: Vue realizes cascading selection of provinces, cities and districts
>>: Some points on using standard HTML codes in web page creation
This article uses examples to illustrate the prin...
background The popularity of Docker is closely re...
This article example shares the specific code of ...
Table of contents 1. Global beforeEach 1. Global ...
MySql Null field judgment and IFNULL failure proc...
1. Previous versions yum remove docker docker-cli...
Docker installation Install dependency packages s...
Table of contents 1. Introduction 2. Installation...
This article describes how to use docker to deplo...
Common Convention Tags Self-closing tags, no need...
How to quickly copy a table First, create a table...
Table of contents Overview 1. Dependency Injectio...
Table of contents Problem Description Front-end c...
Requirements: Remove HTTP response headers in IIS...
In the horizontal direction, you can set the alig...