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
Preface Sometimes you come across business tables...
Preface When my team was developing the tax syste...
Detailed example of IOS database upgrade data mig...
1. The role of brackets 1.1 Square brackets [ ] W...
Table of contents Immediately execute function fo...
Table of contents style scoped style module State...
Common scenarios of MySQL: getting the intersecti...
MySQL installation tutorial for Windows system do...
Code <div class="test"> <div&g...
mysql storage engine: The MySQL server adopts a m...
There are two meta attributes: name and http-equiv...
Original : http://developer.yahoo.com/performance...
Lottie is an open source animation library for iO...
1.html part Copy code The code is as follows: <...
Copy code The code is as follows: <div class=&...