목차 열기

티스토리 뷰

Server/Docker

[Docker] Nextcloud 실행

RuungJi · 2021. 2. 4. 17:31
728x90
반응형

NextCloud 공식 문서

docs.nextcloud.com/server/15/admin_manual/contents.html

 

Table of contents — Nextcloud 15 Administration Manual 15 documentation

© Copyright 2020 Nextcloud GmbH

docs.nextcloud.com

 

 

NextCloud 디렉토리 생성

sudo mkdir -p /data/nextcloud/nextcloud
sudo mkdir -p /data/nextcloud/apps
sudo mkdir -p /data/nextcloud/config
sudo mkdir -p /data/nextcloud/data
sudo mkdir -p /data/nextcloud/theme

 

MariaDB에서 NextCloud 계정 생성

sudo docker exec -it mariadb bash

mysql -u root -p

/---------------------------------------------------------

CREATE DATABASE nextcloud;
CREATE USER 'nextcloud'@'%' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'%';
FLUSH PRIVILEGES;
quit

/---------------------------------------------------------

exit

 

NextCloud와 MariaDB 네트워크 설정

sudo docker network create nextcloud

sudo docker network connect nextcloud mariadb

 

NextCloud 컨테이너 생성

sudo docker run -d \
-p 8585:80 \
--name=nextcloud \
--network=nextcloud \
--restart=unless-stopped \
-v /data/nextcloud/nextcloud:/var/www/html \
-v /data/nextcloud/apps:/var/www/html/custom_apps \
-v /data/nextcloud/config:/var/www/html/config \
-v /data/nextcloud/data:/var/www/html/data \
-v /data/nextcloud/theme:/var/www/html/themes \
-e MYSQL_HOST=mariadb \
-e MYSQL_DATABASE=nextcloud \
-e MYSQL_USER=nextcloud \
-e MYSQL_PASSWORD='[MariaDB 비밀번호]' \
nextcloud

 

 

728x90
반응형
댓글
글 보관함
«   2025/01   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Total
Today
Yesterday